X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_Icons_NDimensions%2FinterfMainPanel.cxx;h=4c67ae203886dbfcf780602e50833104284b8c1c;hb=c77595348f7f7c28b94a3b361994b58c8318b242;hp=7d43990be32d4a103f11e4e1f2853d810bd07850;hpb=2e4190247854f254d184bbccf1f3ffa1d12d773c;p=creaContours.git diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index 7d43990..4c67ae2 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -375,7 +375,31 @@ void interfMainPanel::showPanel(wxWindow* panel){ infoPanel->Refresh(); this->Layout(); this->Refresh(); +} + +/** +** Hide the panel in the +**/ +void interfMainPanel::hidePanel( ){ + wxContourMainFrame::getInstance()->showAxis(false); + wxSizer* sizer = infoPanel->GetSizer(); + + if(currentWindow != NULL){ + currentWindow->Hide(); + sizer->Remove(currentWindow); + } + wxPanel * emptyPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T(""))); + sizer->Add(emptyPanel); + currentWindow = emptyPanel; + currentWindow->Show(true); + splitterwindow->SetSashPosition(splitterwindow->GetSashPosition()+1); + splitterwindow->SetSashPosition(splitterwindow->GetSashPosition()-1); + + infoPanel->Layout(); + infoPanel->Refresh(); + this->Layout(); + this->Refresh(); } /** @@ -700,9 +724,30 @@ void interfMainPanel::onMirrorPressed(){ flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE); flexsizer->Add(panelMirror, wxEXPAND); mirrorPanel->Layout(); + + refLineShown=true; + + showPanel(mirrorPanel); + wxContourMainFrame::getInstance()->referenceLine(); } - showPanel(mirrorPanel); - //hideAxis(); - wxContourMainFrame::getInstance()->referenceLine(); + else + { + if(refLineShown) + { + wxContourMainFrame::getInstance()->refLineHide(); + refLineShown=false; + + hidePanel(); + } + + else if (!refLineShown) + { + wxContourMainFrame::getInstance()->refLineShow(); + refLineShown=true; + + showPanel(mirrorPanel); + } + } + }