long style
)
{
+ this->menu_File = NULL;
+ this->menu_Edit = NULL;
+ this->menu_Tools = NULL;
+ this->menu_Help = NULL;
+ this->panel_Properties = NULL;
+ this->panel_ProjectActions = NULL;
+ this->tree_Projects = NULL;
Create(parent, id, caption, pos, size, style);
}
ID_TREE_PROJECTS,
wxDefaultPosition,
wxSize(200,400),
- wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS
+ wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS
);
panel_Properties = new wxCDMMainDescriptionPanel(
0
);
-
-
-
-
-
-
auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("")).CloseButton(false));
auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Right().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
-
- wxString pers = auiManager.SavePerspective();
-
auiManager.Update();
- auiManager.LoadPerspective(pers,true);
+ //auiManager.LoadPerspective(pers,true);
wxToolTip::Enable(true);
wxToolTip::SetDelay(0);
}
}
}
+
if(!this->model->CreateProject(
crea::wx2std(dialog->GetProjectName()),
crea::wx2std(dialog->GetProjectLocation()),
if(this->model->GetProject() != NULL && !this->model->CloseProject(result))
{
std::cout << "error closing project: " << *result << std::endl;
- wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
}
tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
-
if(this->panel_Properties != NULL)
{
auiManager.DetachPane(this->panel_Properties);
this->panel_Properties->Destroy();
this->panel_Properties = NULL;
}
-
+
if(this->panel_ProjectActions != NULL)
{
auiManager.DetachPane(this->panel_ProjectActions);
this->panel_ProjectActions->Destroy();
this->panel_ProjectActions = NULL;
}
-
+
Close();
- event.Skip();
}
//Edit Menu
std::cout << "Tree Selection id: " << elementId << std::endl;
//get element from model
modelCDMIProjectTreeNode* element = this->model->GetModelElements()[elementId];
+ if (element == NULL)
+ return;
std::cout << "Tree Selection: " << element->GetName() << std::endl;
-
+
//TODO get element type
//project
modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);