]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMBlackBoxHelpDialog.cpp
index 480e9d04b817f73b5b275817e7921a85f774efd2..d8f0c9e57e5943b1a08fa60ea310ab6e1bf2904e 100644 (file)
@@ -155,12 +155,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMPackage*)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(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -182,12 +181,11 @@ void wxCDMBlackBoxHelpDialog::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);
             }
@@ -210,12 +208,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -230,12 +227,11 @@ void wxCDMBlackBoxHelpDialog::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);
             }
@@ -255,12 +251,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
           }
         if (node != NULL)
           {
-            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
             if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
               {
-                int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-                newEvent->SetInt(CMId);
+                newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }
@@ -275,12 +270,11 @@ void wxCDMBlackBoxHelpDialog::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);
               }