]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMApplicationDescriptionPanel.cpp
index 7e8c6dc140259d112534d8a0812439cabfe0372d..1ccf43580e8e80bf7e3aef7d33521f3b369fabcf 100644 (file)
@@ -208,7 +208,7 @@ void wxCDMApplicationDescriptionPanel::OnBtnReturn(wxHyperlinkEvent& event)
       if (parents[i]->GetPath() == parentURL)
         {
           wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
-          newEvent->SetInt(parents[i]->GetId());
+          newEvent->SetClientData(parents[i]);
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -264,7 +264,7 @@ void wxCDMApplicationDescriptionPanel::OnBtnCreateClass(wxCommandEvent& event)
 
           wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
           newEvent->SetId(0);
-          newEvent->SetInt(this->application->GetId());
+          newEvent->SetClientData(this->application);
           wxPostEvent(this->GetParent(), *newEvent);
 
           wxMessageBox(crea::std2wx("The class has been created successfully."),_T("New Class - Success"),wxOK | wxICON_INFORMATION);
@@ -297,7 +297,7 @@ void wxCDMApplicationDescriptionPanel::OnBtnCreateFolder(wxCommandEvent& event)
         }
       ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
       wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
-      newEvent->SetInt(folderC->GetId());
+      newEvent->SetClientData(folderC);
       wxPostEvent(this->GetParent(), *newEvent);
       wxMessageBox(crea::std2wx("The folder was successfully created"),_T("Create Folder - Success"),wxOK | wxICON_INFORMATION);
     }
@@ -317,8 +317,7 @@ void wxCDMApplicationDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event
 
   if(this->application->GetCMakeLists() != NULL)
     {
-      int CMId = this->application->GetCMakeLists()->GetId();
-      newEvent->SetInt(CMId);
+      newEvent->SetClientData(this->application->GetCMakeLists());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
     }
@@ -339,8 +338,7 @@ void wxCDMApplicationDescriptionPanel::OnCMakeMouseEnter(wxMouseEvent& event)
 
   if(this->application->GetCMakeLists() != NULL)
     {
-      int CMId = this->application->GetCMakeLists()->GetId();
-      newEvent->SetInt(CMId);
+      newEvent->SetClientData(this->application->GetCMakeLists());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
     }
@@ -353,8 +351,7 @@ void wxCDMApplicationDescriptionPanel::OnCMakeMouseExit(wxMouseEvent& event)
 
   if(this->application->GetCMakeLists() != NULL)
     {
-      int CMId = this->application->GetCMakeLists()->GetId();
-      newEvent->SetInt(CMId);
+      newEvent->SetClientData(this->application->GetCMakeLists());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
     }
@@ -372,8 +369,7 @@ void wxCDMApplicationDescriptionPanel::OnBtnOpenMain(wxCommandEvent& event)
 
       wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
-      int MId = this->application->GetMainFile()->GetId();
-      newEvent->SetInt(MId);
+      newEvent->SetClientData(this->application->GetMainFile());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
 
@@ -391,8 +387,7 @@ void wxCDMApplicationDescriptionPanel::OnMainMouseEnter(wxMouseEvent& event)
 
   if(this->application->GetMainFile() != NULL)
     {
-      int MId = this->application->GetMainFile()->GetId();
-      newEvent->SetInt(MId);
+      newEvent->SetClientData(this->application->GetMainFile());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
     }
@@ -405,8 +400,7 @@ void wxCDMApplicationDescriptionPanel::OnMainMouseExit(wxMouseEvent& event)
 
   if(this->application->GetMainFile() != NULL)
     {
-      int MId = this->application->GetMainFile()->GetId();
-      newEvent->SetInt(MId);
+      newEvent->SetClientData(this->application->GetMainFile());
       newEvent->SetId(0);
       wxPostEvent(this->GetParent(), *newEvent);
     }