From 827bf260ed8c5451c11c41854c411e8a84d70f11 Mon Sep 17 00:00:00 2001
From: caceres <>
Date: Tue, 26 Jul 2011 14:27:28 +0000
Subject: [PATCH] Save Mechanism working // Diego CACERES DFCH
---
.project | 11 +++++++++++
.../bbtkwxGUIEditorGraphicBBS.cxx | 4 ++--
.../bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx | 9 ++++-----
.../bbsWxGUIEditorGraphic/wxGEditorTabPanel.h | 4 ++--
.../bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx | 8 ++++----
.../bbsWxGUIEditorGraphic/wxTabPanelsManager.h | 4 ++--
6 files changed, 25 insertions(+), 15 deletions(-)
create mode 100644 .project
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);
--
2.47.1