X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;fp=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;h=4a9ec05c1bb0582fdb4703ab5792fc660bc213ae;hb=e581dbc8bf451bedae77aec3d46ef174e9063086;hp=f3f6a04d7e6e8624a984ff3240e38ea3541f9940;hpb=20073a9f91d67c6a712e01bdd9146f34d226c84f;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index f3f6a04..4a9ec05 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -479,15 +479,25 @@ namespace bbtk void wxGUIEditorGraphicBBS::SaveActualComplexBox(std::string filename) { - wxTextEntryDialog *nameDialog = new wxTextEntryDialog(this,wxT("Name of complex box")); + wxTextEntryDialog *cbNameDialog = new wxTextEntryDialog(this,wxT("Complex Box name")); + cbNameDialog->SetValue(_T("BBBBoxName")); std::string cbName=""; - if (nameDialog->ShowModal() == wxID_OK) + if (cbNameDialog->ShowModal() == wxID_OK) { - wxString complexboxname = nameDialog->GetValue(); + wxString complexboxname = cbNameDialog->GetValue(); cbName=(const char*) (complexboxname.mb_str()); } - if(!cbName.empty()) + wxTextEntryDialog *paNameDialog = new wxTextEntryDialog(this,wxT("Package name")); + paNameDialog->SetValue(_T("PPPPackageName")); + std::string paName=""; + if (paNameDialog->ShowModal() == wxID_OK) + { + wxString packagename = paNameDialog->GetValue(); + paName=(const char*) (packagename.mb_str()); + } + + if( (!cbName.empty()) || (!paName.empty()) ) { ofstream file; @@ -503,7 +513,7 @@ namespace bbtk content += "\n"; content += "# ----------------------------------\n"; content += "\n"; - content += _tabsMgr->getActualComplexBoxBBS(cbName); + content += _tabsMgr->getActualComplexBoxBBS(cbName,paName); file << content; file.close(); } @@ -557,7 +567,8 @@ namespace bbtk { wxString fileName = saveFileDialog->GetPath(); std::string filename = (const char*) (fileName.mb_str()); - std::string filenamebbs = filename+"s"; + std::string filenamebbs = filename; + filenamebbs[filename.length()-1]='s'; SaveActualDiagram( filename ); if (_tabsMgr->isActualDiagramComplexBox()==false)