((wxCDMMainFrame*)this->GetParent())->RefreshProject();
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
- newEvent->SetInt(library->GetId());
+ newEvent->SetClientData(library);
wxPostEvent(this->GetParent(), *newEvent);
}
}
if(this->lib->GetCMakeLists() != NULL)
{
- int CMId = this->lib->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->lib->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
void wxCDMLibDescriptionPanel::OnLnkLibrarySelect(wxHyperlinkEvent& event)
{
- int libraryId = 0;
+ modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
for (int i = 0; i < libraries.size(); i++)
{
if(libraries[i]->GetName() == crea::wx2std(event.GetURL()))
{
- libraryId = libraries[i]->GetId();
+ theLibrary = libraries[i];
break;
}
}
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
- newEvent->SetInt(libraryId);
+ newEvent->SetClientData(theLibrary);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
- newEvent1->SetInt(libraryId);
+ newEvent1->SetClientData(theLibrary);
newEvent1->SetId(0);
wxPostEvent(this->GetParent(), *newEvent1);
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);
}
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
std::string LibName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
- int lbId = 0;
+ modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
for (int i = 0; i < libraries.size(); i++)
{
if(libraries[i]->GetName() == LibName)
{
- lbId = libraries[i]->GetId();
+ theLibrary = libraries[i];
break;
}
}
- newEvent->SetInt(lbId);
+ newEvent->SetClientData(theLibrary);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
event.Skip();
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
std::string LibName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
- int lbId = 0;
+ modelCDMLibrary* theLibrary = NULL;
std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
for (int i = 0; i < libraries.size(); i++)
{
if(libraries[i]->GetName() == LibName)
{
- lbId = libraries[i]->GetId();
+ theLibrary = libraries[i];
break;
}
}
- newEvent->SetInt(lbId);
+ newEvent->SetClientData(theLibrary);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
event.Skip();
if(this->lib->GetCMakeLists() != NULL)
{
- int CMId = this->lib->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->lib->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
if(this->lib->GetCMakeLists() != NULL)
{
- int CMId = this->lib->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->lib->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}