]> Creatis software - bbtkGEditor.git/commitdiff
Save Mechanism working // Diego CACERES DFCH
authorcaceres <>
Tue, 26 Jul 2011 14:27:28 +0000 (14:27 +0000)
committercaceres <>
Tue, 26 Jul 2011 14:27:28 +0000 (14:27 +0000)
.project [new file with mode: 0644]
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h

diff --git a/.project b/.project
new file mode 100644 (file)
index 0000000..a584654
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>bbtkGEditor</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+       </buildSpec>
+       <natures>
+       </natures>
+</projectDescription>
index f24749f..1d144fe 100644 (file)
@@ -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();
                }
index c449799..cd591b1 100644 (file)
@@ -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 <<std::endl;
-               //std::cout<<"wxGEditorTabPanel Real: " << this->_fullPath <<std::endl;
+               this->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);
        }
 
index e7eb553..402e2a7 100644 (file)
@@ -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);
index e00c12e..f2aa6b0 100644 (file)
@@ -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);
        }
 
        //=========================================================================
index 9d710cd..35618a7 100644 (file)
@@ -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);