]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
remove view manager from memory when it become unused
authorptv <ptv@opencascade.com>
Mon, 14 Nov 2005 12:15:17 +0000 (12:15 +0000)
committerptv <ptv@opencascade.com>
Mon, 14 Nov 2005 12:15:17 +0000 (12:15 +0000)
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h

index 87e483ecf2811d0fdfc3cf086fecc637bf784ee1..19d6fc62ed96320db44eaf1614938853eb1ae0e0 100644 (file)
@@ -1856,3 +1856,12 @@ void LightApp_Application::onWCDestroyed( QObject* ob )
     break;
   }
 }
+
+/*! redefined to remove view manager from memory */
+void LightApp_Application::removeViewManager( SUIT_ViewManager* vm )
+{
+  disconnect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
+           this, SLOT( onCloseView( SUIT_ViewManager* ) ) );
+  STD_Application::removeViewManager( vm );
+  delete vm;
+}
index ef00439dea442b758dbca004e63ba0e7f9a8648a..ff42be4ff88fe7061222377ca557e7ff9a2b765a 100644 (file)
@@ -79,6 +79,7 @@ public:
   void                                updateActions();
 
   SUIT_ViewManager*                   getViewManager( const QString&, const bool );
+  virtual void                        removeViewManager( SUIT_ViewManager* );
   QWidget*                            getWindow( const int, const int = -1 );
   QWidget*                            window( const int, const int = -1 ) const;
   void                                addWindow( QWidget*, const int, const int = -1 );