X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FcreaButtonContainer%2Fview%2FlistConfigDialog.cxx;h=154bac42f6c06a8ccb1a1d83c0da399298d4ba2c;hb=46fa5cac1a169b7c987bf954e7df39a8bceb1dc4;hp=d1b1776fd40a3616249ed5154a4f267053501c7c;hpb=5bcbe43584902af3a90cfbd1a886a9c8434f236e;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx index d1b1776..154bac4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx @@ -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(); } } }