]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
Bug #1355 The complete tab is not erased from memory. Only the objects are deleted...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxGEditorTabPanel.cxx
index 6225ee313d1a0691c4c966387d9285c229ee11e7..682c1193ffecf282544166a111c9487815eac2db 100644 (file)
@@ -62,7 +62,7 @@ printf("EED wxGEditorTabPanel::wxGEditorTabPanel 1\n");
        //=========================================================================
        wxGEditorTabPanel::~wxGEditorTabPanel()
        {
-printf ("EED %p ~wxGEditorTabPanel()\n" , this );
+printf ("EED %p ~wxGEditorTabPanel() START \n" , this );
 //ED02JUIN2010         _sceneManager->disconnectDrop();
 
         _panelsManager->VerifyLastTabPanel();
@@ -70,6 +70,8 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
                delete _panelAUIMgr;
                delete _sceneManager;
 
+               printf ("EED %p ~wxGEditorTabPanel() END\n" , this );
+
        }
 
        //=========================================================================
@@ -221,7 +223,30 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
        }
 
        //=========================================================================
-       unsigned short wxGEditorTabPanel::loadTempDiagram(unsigned short un) //FCY
+       unsigned short wxGEditorTabPanel::getUndoState()
+       {
+               if(states.size()>0)
+               {
+                       if(_actualdo == states.begin() )
+                               return 0;
+                       else
+                               return 1;
+               }
+       }
+
+       unsigned short wxGEditorTabPanel::getRedoState()
+       {
+               if(states.size()>0)
+               {
+                       if(_actualdo == --states.end() || states.size() == 1)
+                               return 0;
+                       else
+                               return 1;
+               }
+       }
+
+       //=========================================================================
+       void wxGEditorTabPanel::loadTempDiagram(unsigned short un) //FCY
        {
                unsigned short res = 1;
                deleteAllBoxes();
@@ -255,7 +280,7 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n");
                        }
                }
                _sceneManager->loadDiagram(ss);
-               return res;
+       
        }
        
        //=========================================================================