]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMPackageHelpDialog.cpp
index c7b468eeb2739b27a3887660c2949d3548d655a2..07d653a839be08496ee58ae4bd61fe1f49ac42ad 100644 (file)
@@ -137,12 +137,11 @@ void wxCDMPackageHelpDialog::OnCMakeLists(wxCommandEvent& event)
       if(!this->package->OpenCMakeListsFile(result))
         wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
       if(this->package->GetCMakeLists() != NULL)
         {
-          int CMId = this->package->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->package->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -159,12 +158,11 @@ void wxCDMPackageHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMProject*)node)->OpenCMakeListsFile(result))
             wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -180,12 +178,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
 {
   if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE)
     {
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
       if(this->package->GetCMakeLists() != NULL)
         {
-          int CMId = this->package->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->package->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -199,12 +196,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -217,12 +213,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
 {
   if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE)
     {
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
       if(this->package->GetCMakeLists() != NULL)
         {
-          int CMId = this->package->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->package->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -236,12 +231,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }