]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / wxCDMApplicationDescriptionPanel.cpp
index 00cf8cc12719f170b0a451c6e67e345bbbe47473..9f91b854fe918fffa389f0ac424e1c5491cd2975 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,12 +361,18 @@ 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)
 {
-  this->application->SetCustomLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+  if(this->application->SetCustomLibrary(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::OnBtnCreateClass(wxCommandEvent& event)