//populate tree control
tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
- tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
- tree_Projects->SelectItem(this->model->GetProject()->GetId(), true);
+ tree_Projects->Unselect();
+ tree_Projects->SelectItem(this->model->GetProject()->GetId());
//show project actions panel
//populate tree control
tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
- tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
+ tree_Projects->Unselect();
tree_Projects->SelectItem(this->model->GetProject()->GetId(), true);
{
std::cout << "error closing project: " << *result << std::endl;
}
- tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
+
if(this->panel_Properties != NULL)
{
auiManager.DetachPane(this->panel_Properties);
this->panel_Properties = NULL;
}
+ if(this->tree_Projects != NULL)
+ {
+ auiManager.DetachPane(this->tree_Projects);
+ this->tree_Projects->Destroy();
+ this->tree_Projects = NULL;
+ }
+
if(this->panel_ProjectActions != NULL)
{
auiManager.DetachPane(this->panel_ProjectActions);
this->tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
this->auiManager.Update();
- this->tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
+ this->tree_Projects->Unselect();
this->tree_Projects->SelectItem(this->model->GetProject()->GetId(), true);
}
event.Skip();
html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html -> SetBorders(0);
- html -> LoadPage(wxT("about.html"));
+
+ std::string content = ""
+ "<html>"
+ "<body bgcolor=\"#3333CC\">"
+ "<table cellspacing=3 cellpadding=4 width=\"100%\">"
+ " <tr>"
+ " <td bgcolor=\"#3333CC\">"
+ " <center>"
+ " <font size=+2 color=\"#FFFFFF\"><b>CREA Development Manager</b>"
+ " </font>"
+ " </center>"
+ " </td>"
+ " </tr>"
+ " <tr>"
+ " <td bgcolor=\"#FFFFFF\">"
+ " <p><b><font size=+1>Creatis 2012 - Lyon, France</font></b></p>"
+ " <font size=-1>"
+ " <table cellpadding=0 cellspacing=0 width=\"100%\">"
+ " <tr>"
+ " <td width=\"65%\">"
+ " <p>Created by Daniel González - daniel.gonzalez@creatis.insa-lyon.fr</p>"
+ " </td>"
+ " </tr>"
+ " </table>"
+ " <font size=1>"
+ " <p>This software is governed by the CeCILL-B license under French law and abiding by the rules of distribution of free software.</p>"
+ " </font>"
+ " </font>"
+ " </td>"
+ " </tr>"
+ "</table>"
+ "</body>"
+ "</html>"
+ ;
+
+ html -> SetPage(crea::std2wx(content));
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
html -> GetInternalRepresentation() -> GetHeight());
}
}
- if(this->panel_Properties!= NULL)
- this->panel_Properties->Hide();
-
- auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
- auiManager.Update();
-
//delete old view
if(this->panel_Properties!= NULL)
{
+ this->panel_Properties->Hide();
auiManager.DetachPane(this->panel_Properties);
this->panel_Properties->Destroy();
this->panel_Properties = NULL;
}
//set new view
-
+ auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
this->panel_Properties = description;
- //auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400).CloseButton(false));
auiManager.Update();
event.Skip();
}
case 0:
myItem = ((modelCDMIProjectTreeNode*)event.GetClientData());
//select out old one to generate selection event
- this->tree_Projects->SelectItem(myItem->GetId(), false);
+ this->tree_Projects->Unselect();
this->tree_Projects->SelectItem(myItem->GetId(), true);
this->tree_Projects->Expand(myItem->GetId());
break;
wxPanel* description = NULL;
if(event.GetString() == wxT("manage_packages"))
{
- this->tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
- this->tree_Projects->Expand(this->model->GetProject()->GetId());
+ //this->tree_Projects->Expand(this->model->GetProject()->GetId());
+ //this->tree_Projects->Unselect();
description = new wxCDMPackageManagerPanel(
this,
this->model->GetProject(),
}
else if(event.GetString() == wxT("blackbox"))
{
- this->tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
+ this->tree_Projects->Unselect();
modelCDMBlackBox* bb = (modelCDMBlackBox*)event.GetClientData();
description = new wxCDMBlackBoxDescriptionPanel(
this,
);
}
- if(this->panel_Properties!= NULL)
- this->panel_Properties->Hide();
-
- auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
- auiManager.Update();
-
//delete old view
if(this->panel_Properties!= NULL)
{
+ this->panel_Properties->Hide();
auiManager.DetachPane(this->panel_Properties);
this->panel_Properties->Destroy();
this->panel_Properties = NULL;
}
//set new view
-
+ auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
this->panel_Properties = description;
auiManager.Update();
+
break;
}
event.Skip();