]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / wxCDMApplicationDescriptionPanel.cpp
index 00cf8cc12719f170b0a451c6e67e345bbbe47473..acf54c0a984d473cbbf3b5a22e7d1fd7f3909dfd 100644 (file)
@@ -82,13 +82,11 @@ bool wxCDMApplicationDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
-
+  this->application = application;
+  CreateControls();
   // this part makes the scrollbars show up
   this->FitInside(); // ask the sizer about the needed size
   this->SetScrollRate(5, 5);
-
-  this->application = application;
-  CreateControls();
   return TRUE;
 }
 
@@ -363,7 +361,10 @@ void wxCDMApplicationDescriptionPanel::OnBtnSetExeName(wxCommandEvent& event)
 
 void wxCDMApplicationDescriptionPanel::On3rdLibraryChBChange(wxCommandEvent& event)
 {
-  this->application->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+  if(this->application->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue()))
+    ((wxCheckBox*)event.GetEventObject())->SetValue(((wxCheckBox*)event.GetEventObject())->GetValue());
+  else
+    ((wxCheckBox*)event.GetEventObject())->SetValue(!((wxCheckBox*)event.GetEventObject())->GetValue());
 }
 
 void wxCDMApplicationDescriptionPanel::OnLibraryChBChange(wxCommandEvent& event)