From: caceres <>
Date: Tue, 26 Jul 2011 14:27:28 +0000 (+0000)
Subject: Save Mechanism working // Diego CACERES DFCH
X-Git-Tag: v1_0_0~10
X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=827bf260ed8c5451c11c41854c411e8a84d70f11;p=bbtkGEditor.git
Save Mechanism working // Diego CACERES DFCH
---
diff --git a/.project b/.project
new file mode 100644
index 0000000..a584654
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+
+
+ bbtkGEditor
+
+
+
+
+
+
+
+
diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
index f24749f..1d144fe 100644
--- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
+++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
@@ -566,7 +566,7 @@ namespace bbtk
content += "# ----------------------------------\n";
content += "\n";
content += "APP_START\n";
- _tabsMgr->saveActualDiagram(content);
+ _tabsMgr->saveActualDiagram(content, filename); //DFCH
content += "APP_END\n";
file << content;
file.close();
@@ -695,7 +695,7 @@ namespace bbtk
inputStream.open( fName.c_str() );
_tabsMgr->addNewTab( openFileDialog->GetFilename() );
- _tabsMgr->loadDiagram(inputStream);
+ _tabsMgr->loadDiagram(inputStream, fName);
inputStream.close();
}
diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
index c449799..cd591b1 100644
--- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
+++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
@@ -173,18 +173,17 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
//=========================================================================
- void wxGEditorTabPanel::saveDiagram(std::string &content)
+ void wxGEditorTabPanel::saveDiagram(std::string &content, const std::string &path) //DFCH
{
- this->SetFullPath(content);
- std::cout<<"wxGEditorTabPanel: " << content <_fullPath <SetFullPath(path);
_sceneManager->saveDiagram(content);
}
//=========================================================================
- void wxGEditorTabPanel::loadDiagram(ifstream &inputStream)
+ void wxGEditorTabPanel::loadDiagram(ifstream &inputStream, const std::string &path) //DFCH
{
+ this->SetFullPath(path);
_sceneManager->loadDiagram(inputStream);
}
diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
index e7eb553..402e2a7 100644
--- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
+++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
@@ -98,10 +98,10 @@ namespace bbtk
void editBlackBox(GBlackBoxModel *bbmodel);
// Save diagram as BBG
- void saveDiagram(std::string &content);
+ void saveDiagram(std::string &content, const std::string &path); //DFCH
// Load BBG diagram
- void loadDiagram(ifstream &inputStream);
+ void loadDiagram(ifstream &inputStream, const std::string &path); //DFCH
// Add a new complex input object to the scene
void addComplexInputPort(std::string portName);
diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
index e00c12e..f2aa6b0 100644
--- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
+++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
@@ -132,16 +132,16 @@ printf("EED wxTabPanelsManager::addNewTab 1\n");
//=========================================================================
- void wxTabPanelsManager::saveActualDiagram(std::string &content)
+ void wxTabPanelsManager::saveActualDiagram(std::string &content, const std::string &path) //DFCH
{
- _actual->saveDiagram(content);
+ _actual->saveDiagram(content, path);
}
//=========================================================================
- void wxTabPanelsManager::loadDiagram(ifstream &inputStream)
+ void wxTabPanelsManager::loadDiagram(ifstream &inputStream, const std::string &path) //DFCH
{
- _actual->loadDiagram(inputStream);
+ _actual->loadDiagram(inputStream, path);
}
//=========================================================================
diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
index 9d710cd..35618a7 100644
--- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
+++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
@@ -84,8 +84,8 @@ namespace bbtk
void editBlackBox(GBlackBoxModel *bbmodel);
void deleteAllBoxesActualDiagram();
void centerViewActualDiagram();
- void saveActualDiagram(std::string &content);
- void loadDiagram(ifstream &inputStream);
+ void saveActualDiagram(std::string &content, const std::string &path); //DFCH
+ void loadDiagram(ifstream &inputStream, const std::string &path); //DFCH
bool isActualDiagramComplexBox();
void setActualDiagramComplexBox(bool val);
void addActualDiagramComplexInputPort(std::string portName);