- 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 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() );
- }
+ if ((getCurrentDiagramExportFormat()==1) || (getCurrentDiagramExportFormat()==2) ) // 1:All 2:bbs,Python
+ {
+ 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() );
+ } // ExportFormat 1 or 2 All and Python
+ if ((getCurrentDiagramExportFormat()==1) || (getCurrentDiagramExportFormat()==3) ) // 1:All 3:bbs,JavaScript
+ {
+ 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() );
+ } // ExportFormat 1 or 3 All and JavaScript
+ } // if pathfilename empty