]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx
#2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / listConfigDialog.cxx
index d1b1776fd40a3616249ed5154a4f267053501c7c..154bac42f6c06a8ccb1a1d83c0da399298d4ba2c 100644 (file)
@@ -43,6 +43,7 @@ namespace creaButtonContainer
                        this->m_CurrentListWx->Reparent(this);
                        this->m_CurrentListWx->SetFunctorEnabled(false);
                        this->m_CurrentListWx->Show(true);
+                       this->m_LastStatus = this->m_CurrentListWx->GetListBox()->GetStrings();
 
                        wxGridBagSizer* dialogSizer = new wxGridBagSizer(0, 0);
                        dialogSizer->AddGrowableCol(0);
@@ -90,6 +91,8 @@ namespace creaButtonContainer
                                        wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL
                                                        | wxALIGN_CENTER_VERTICAL, 5);
 
+                       //Bottom Sizer
+
                        wxBoxSizer* bottomSizer = new wxBoxSizer(wxHORIZONTAL);
                        bottomSizer->Add(0, 0, 1,
                                        wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
@@ -211,11 +214,15 @@ namespace creaButtonContainer
                }
                void ListConfigDialog::OnOk(wxCommandEvent& event)
                {
+
                        this->EndModal(1);
                }
                void ListConfigDialog::OnCancel(wxCommandEvent& event)
                {
-                       Close();
+
+                       this->m_CurrentListWx->GetListBox()->Clear();
+                       this->m_CurrentListWx->GetListBox()->Append(this->m_LastStatus);
+                       this->Close();
                }
        }
 }