/////////////////////////////////
/// IMPORTANT!! FOR SAVE&LOAD PROCESSES THE VERSION IS VERY IMPORTANT.
/// RaC 2012 2nd Hackfest
- _currentBBGversion="1.5";
+ _currentBBGversion="1.6";
}
//=========================================================================
} else {
std::string pathfilenamebbs = pathfilename;
pathfilenamebbs[pathfilenamebbs.length() - 1] = 's';
-
if (_tabsMgr->isActualDiagramComplexBox() == false) {
std::string name = _tabsMgr->GetNameTabPanel();
if(name[name.length() - 1] == '*')
SaveActualDiagram(pathfilename);
SaveActualComplexBox(pathfilenamebbs);
} //if isActualDiagramComplexBox
- 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
}
//=========================================================================
//DFCH
_tabsMgr->SetAuthor(author);
}
+//=========================================================================
+void wxGUIEditorGraphicBBS::setCurrentDiagramExportFormat(int exportformat)
+{
+ _tabsMgr->SetExportFormat( exportformat );
+}
+
//=========================================================================
void wxGUIEditorGraphicBBS::setCurrentDiagramCategory(std::string category)
{
return _tabsMgr->GetAuthor();
}
+//=========================================================================
+int wxGUIEditorGraphicBBS::getCurrentDiagramExportFormat()
+{
+ return _tabsMgr->GetExportFormat();
+}
+
//=========================================================================
std::string wxGUIEditorGraphicBBS::getCurrentDiagramCategory()
{