]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
This modification've come here from V5_MDI_fix branch.
authornds <nds@opencascade.com>
Tue, 10 Nov 2009 05:52:00 +0000 (05:52 +0000)
committernds <nds@opencascade.com>
Tue, 10 Nov 2009 05:52:00 +0000 (05:52 +0000)
The comments: Exclude reparent event for ViewWindow.

src/SUIT/SUIT_Desktop.cxx
src/SUIT/SUIT_Desktop.h
src/SUIT/SUIT_ViewManager.cxx

index 65fda831478d54d755cfd43f27d469e5b3886ae8..8511d71f29d2cd1fb160c43054cab80bbf259e9e 100755 (executable)
@@ -99,15 +99,15 @@ void SUIT_Desktop::closeEvent( QCloseEvent* e )
 /*!
   Child event.
 */
-void SUIT_Desktop::childEvent( QChildEvent* e )
+/*void SUIT_Desktop::childEvent( QChildEvent* e )
 {
   if ( e->type() == QEvent::ChildAdded && e->child()->isWidgetType() )
     QApplication::postEvent( this, new ReparentEvent( QEvent::Type( Reparent ), e->child() ) );
   else
     QtxMainWindow::childEvent( e );
-}
+}*/
 
-void SUIT_Desktop::customEvent( QEvent* e )
+/*void SUIT_Desktop::customEvent( QEvent* e )
 {
   if ( (int)e->type() != Reparent )
     return;
@@ -122,7 +122,7 @@ void SUIT_Desktop::customEvent( QEvent* e )
     addWindow( wid );
     wid->setShown( !invis );
   }
-}
+}*/
 
 /*!
   Gets menu manager.
index c38c38128046d3674688511cca02c7faf964f998..0bf23d94583c40639775134a320d3ddd58604757 100755 (executable)
@@ -68,6 +68,8 @@ public:
   void                     emitActivated();
   void                     emitMessage( const QString& );
 
+  virtual void             addWindow( QWidget* ) = 0;
+
 signals:
   void                     activated();
   void                     deactivated();
@@ -77,11 +79,10 @@ signals:
 
 protected:
   virtual bool             event( QEvent* );
-  virtual void             customEvent( QEvent* );
+  //virtual void             customEvent( QEvent* );
   virtual void             closeEvent( QCloseEvent* );
-  virtual void             childEvent( QChildEvent* );
+  //virtual void             childEvent( QChildEvent* );
 
-  virtual void             addWindow( QWidget* ) = 0;
 
 private:
   QtxActionMenuMgr*        myMenuMgr;
index 34ee0c10ca3ae191fa068dc2af8b5045e560de83..2a84f9fa0a8ea14165b9518dd2d7e55ee1cf71b1 100755 (executable)
@@ -20,7 +20,7 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_ViewModel.h"
-#include <SUIT_ViewWindow.h>
+#include "SUIT_ViewWindow.h"
 #include "SUIT_Study.h"
 
 #include <QMap>
@@ -150,7 +150,7 @@ SUIT_ViewWindow* SUIT_ViewManager::createViewWindow()
   setViewName( aView );
   aView->setWindowIcon( QIcon( myIcon ) );
 
-  //myDesktop->addViewWindow( aView );
+  myDesktop->addWindow( aView );
   //it is done automatically during creation of view
 
   aView->setViewManager( this );
@@ -159,6 +159,7 @@ SUIT_ViewWindow* SUIT_ViewManager::createViewWindow()
   // Special treatment for the case when <aView> is the first one in this view manager
   // -> call onWindowActivated() directly, because somebody may always want
   // to use getActiveView()
+  aView->show();
   if ( !myActiveView )
     onWindowActivated( aView );