]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
Save Mechanism working // Diego CACERES DFCH
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxGEditorTabPanel.cxx
index c0255da5686e4dbc98eb685a8c84bf31bd895f07..cd591b16d36a18a543dc1a82928c583aa0ebd911 100644 (file)
@@ -65,6 +65,9 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
 //ED02JUIN2010         _sceneManager->disconnectDrop();
 
         _panelsManager->VerifyLastTabPanel();
+               //FCY memory leaks
+               delete _panelAUIMgr;
+               delete _sceneManager;
 
        }
 
@@ -162,20 +165,25 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
 
        void wxGEditorTabPanel::centerView()
        {
-               _sceneManager->centerView();
+               if(_sceneManager)
+               {
+                       _sceneManager->centerView();
+               }
        }
 
        //=========================================================================
 
-       void wxGEditorTabPanel::saveDiagram(std::string &content)
+       void wxGEditorTabPanel::saveDiagram(std::string &content, const std::string &path) //DFCH
        {
+               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);
        }
 
@@ -306,10 +314,30 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
     {
         _sceneManager->SetDescription( description );
     }
-
-
-
-
+    //=========================================================================
+       //DFCH
+       void wxGEditorTabPanel::SetFullPath( const std::string& fullpath )
+       {
+               this->_fullPath = fullpath;
+       }
+       //=========================================================================
+       //DFCH
+       void wxGEditorTabPanel::SetFileName( const std::string& filename )
+       {
+               this->_fileName = filename;
+       }
+       //=========================================================================
+       //DFCH
+       std::string wxGEditorTabPanel::GetFullPath( )
+       {
+               return( this->_fullPath );
+       }
+       //=========================================================================
+       //DFCH
+    std::string wxGEditorTabPanel::GetFileName( )
+    {
+               return( this->_fileName );
+       }