]> Creatis software - creaContours.git/blobdiff - lib/Interface_Icons_NDimensions/interfMainPanel.cxx
#3145 creaContours Bug New Normal - changeWx28to30
[creaContours.git] / lib / Interface_Icons_NDimensions / interfMainPanel.cxx
index 7d77c933622ace10e4195237b09823ef94fbae81..83da40fc269afdd5f346003d8d53ba907185ceaf 100644 (file)
@@ -32,7 +32,6 @@ wxFrame* interfMainPanel::_newframe=NULL;
 interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir)
 : wxPanel(parent, -1, wxDefaultPosition, wxSize(sizex, sizey), wxBORDER_SUNKEN)
 {
-
        PANEL                                   = "New Contour";
        PANEL1                                  = "I/O";
        PANEL2                                  = "Edit";
@@ -68,7 +67,12 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
 
        wxPanel* toolpanel = new wxPanel(splitterwindow, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_DOUBLE, wxString(_T("")));
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6,2,1,1);
+#else
+       wxFlexGridSizer* flexsizer = new wxFlexGridSizer(6);
+#endif
        toolpanel->SetSizer(flexsizer, true);
        toolpanel->SetAutoLayout( true );
 
@@ -88,7 +92,6 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH
        wxButton* b6 = getButton(toolpanel);
        b6->SetClientData(&PANEL6);
 
-
        wxPanel* mentex  = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
        wxPanel* mentex1 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
        wxPanel* mentex2 = new wxPanel(toolpanel, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxString(_T("")));
@@ -330,7 +333,13 @@ void interfMainPanel::showPanel(wxWindow* panel)
        if(currentWindow != NULL){
                currentWindow->Hide();
                /// \TODO fix warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                sizer->Remove(currentWindow);
+#else
+               sizer->Detach(currentWindow);
+#endif
+
        }
        sizer->Add(panel);
        currentWindow = panel;
@@ -356,7 +365,13 @@ void interfMainPanel::hidePanel( )
        if(currentWindow != NULL){
                currentWindow->Hide();
                /// \TODO fix warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                sizer->Remove(currentWindow);
+#else
+               sizer->Detach(currentWindow);
+#endif
+
        }
        wxPanel * emptyPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
        sizer->Add(emptyPanel);