if(!this->application->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->application->GetCMakeLists() != NULL)
{
- int CMId = this->application->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->application->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
if(!((modelCDMAppli*)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(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
{
- int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
{
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->application->GetCMakeLists() != NULL)
{
- int CMId = this->application->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->application->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
}
if (node != NULL)
{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
if(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
{
- int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
{
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->application->GetCMakeLists() != NULL)
{
- int CMId = this->application->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(this->application->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}
}
if (node != NULL)
{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
if(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
{
- int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
- newEvent->SetInt(CMId);
+ newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
}