]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
Clean code for Python
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / bbtkwxGUIEditorGraphicBBS.cxx
index f019a5caf0e622ed0034ff52f943faeba9f9a0fd..02c8c3f1d0e70f91667a081101e9430018bc82e3 100644 (file)
@@ -963,10 +963,14 @@ void wxGUIEditorGraphicBBS::OnSaveActualDiagram(wxCommandEvent& event) {
                        SaveActualDiagram(pathfilename);
                        SaveActualComplexBox(pathfilenamebbs);
                } //if isActualDiagramComplexBox
-        std::string cmdPy("source ~/.bashrc;  bbs2 "+pathfilenamebbs+" py" );
+        std::string pathfilenamepy = pathfilenamebbs;
+        pathfilenamepy.replace( pathfilenamepy.length()-3, 3 , "py");
+        std::string cmdPy("source ~/.bashrc;  bbs2 "+pathfilenamebbs+" "+pathfilenamepy);
         printf("EED wxGUIEditorGraphicBBS::OnSaveActualDiagram cmd:%s\n", cmdPy.c_str() );
         system( cmdPy.c_str() );
-        std::string cmdjs("source ~/.bashrc;  bbs2 "+pathfilenamebbs+" js" );
+        std::string pathfilenamejs = pathfilenamebbs;
+        pathfilenamejs.replace( pathfilenamejs.length()-3, 3 , "js");
+        std::string cmdjs("source ~/.bashrc;  bbs2 "+pathfilenamebbs+" "+pathfilenamejs);
         printf("EED wxGUIEditorGraphicBBS::OnSaveActualDiagram cmd:%s\n", cmdjs.c_str() );
         system( cmdjs.c_str() );
        }