]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
Changes for saveAs button
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxGEditorTabPanel.cxx
index c0255da5686e4dbc98eb685a8c84bf31bd895f07..c44979971df2db8c622a96829e34ebe89070aecb 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,13 +165,19 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
 
        void wxGEditorTabPanel::centerView()
        {
-               _sceneManager->centerView();
+               if(_sceneManager)
+               {
+                       _sceneManager->centerView();
+               }
        }
 
        //=========================================================================
 
        void wxGEditorTabPanel::saveDiagram(std::string &content)
        {
+               this->SetFullPath(content);
+               std::cout<<"wxGEditorTabPanel: " << content <<std::endl;
+               //std::cout<<"wxGEditorTabPanel Real: " << this->_fullPath <<std::endl;
                _sceneManager->saveDiagram(content);
        }
 
@@ -306,10 +315,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 );
+       }