- //Link to return
- wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project"));
- returnbt->SetToolTip(wxT("Return to the active project description."));
- sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5);
+ //Links to return
+ wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
+ std::vector<modelCDMIProjectTreeNode*> parents = this->application->GetParents();
+ for (int i = 0; i < parents.size(); i++)
+ {
+ wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+ returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
+ linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
+ if (i < parents.size()-1)
+ {
+ linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
+ }
+ }
+ sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5);