]> 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 f24749f35c9ff1b69dd4bbe700c4696074c601bc..1d144fe68d672874bb4a024a1a9146cf1af6f297 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 c44979971df2db8c622a96829e34ebe89070aecb..cd591b16d36a18a543dc1a82928c583aa0ebd911 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 e7eb55338344e9ebbb92b4f8b1d31c2cf4ac174f..402e2a7c0e43e30648f037739c85039046a2e1a6 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 e00c12e9ba1f6ce229886c89765462ef9450e5ff..f2aa6b03d9f5b89221ca481d073811c77598ec97 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 9d710cdc5020cebb099fa0c441e950a7200a6878..35618a7cec9c0fe0b79654d3ae27c95e9bc5cbd8 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);