]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
#1351
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / bbtkwxGUIEditorGraphicBBS.cxx
index af24586bf94ea1e451900fdbf7e6a69b38b866c4..25c4298571c017fe73111c325ae3b4d81f171053 100644 (file)
@@ -210,7 +210,9 @@ void wxGUIEditorGraphicBBS::initMenu() {
        fileMenu->Append(ID_SAVE_AS_DIAGRAM, _T("Save Diagram As"),
                        _T("Save Diagram As")); //DFCH
        fileMenu->Append(ID_OPEN_BBS, _T("Open BBS"), _T("Open BBS"));
-       fileMenu->Append(ID_SAVE_AS_BBS, _T("Save BBS"), _T("Save BBS"));
+        // CM
+       fileMenu->Append(ID_OPEN, _T("Open a diagram"), _T("Open a diagram"));
+        fileMenu->Append(ID_SAVE_AS_BBS, _T("Save BBS"), _T("Save BBS"));
        fileMenu->Append(ID_SAVE_AS_COMPLEXBOX, _T("Save complex box"),
                        _T("Save complex box"));
        fileMenu->Append(wxID_EXIT, _T("E&xit"), _T("Exit"));
@@ -422,6 +424,13 @@ void wxGUIEditorGraphicBBS::editBlackBox(GBlackBoxModel *bbmodel) {
 
 //=========================================================================
 
+bool wxGUIEditorGraphicBBS::boxNameExists(std::string boxname) {
+       return this->_tabsMgr->getActualTabPanel()->getSceneManager()->boxExist(boxname);
+}
+
+//=========================================================================
+
 void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus) {
        SetStatusText(crea::std2wx(textStatus));
 }
@@ -492,7 +501,7 @@ void wxGUIEditorGraphicBBS::OnUndo(wxCommandEvent& event) {
                {
                        name =name.substr(0,name.length()-1);
                }
-               _tabsMgr->SetNameTabPanel(name);
+               _tabsMgr->SetNameTabPanel(wxString (name.c_str(), wxConvUTF8));
        }
 
        GetToolBar()->EnableTool(ID_UNDO,disable);
@@ -669,7 +678,7 @@ void wxGUIEditorGraphicBBS::SaveTempActualDiagram()
        std::string name = _tabsMgr->GetNameTabPanel();
        if(name[name.length() - 1] != '*')
                name +="*";
-       _tabsMgr->SetNameTabPanel(name);
+       _tabsMgr->SetNameTabPanel(wxString (name.c_str(), wxConvUTF8));
        _tabsMgr->saveTempActualDiagram();
 }