]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Don't allow to show hidden child widgets.
authorstv <stv@opencascade.com>
Mon, 21 Nov 2005 13:43:25 +0000 (13:43 +0000)
committerstv <stv@opencascade.com>
Mon, 21 Nov 2005 13:43:25 +0000 (13:43 +0000)
src/SUIT/SUIT_Desktop.cxx

index 25d5da9772c66958019e97f2e8cc80adedade723..3d41900dbf9e0c1045f3c2f7c128fd2d8a8cf2a4 100755 (executable)
@@ -239,7 +239,12 @@ void SUIT_Desktop::childEvent( QChildEvent* e )
 {
   if ( e->type() == QEvent::ChildInserted && parentArea() &&
        e->child()->isWidgetType() && e->child()->inherits( "SUIT_ViewWindow" ) )
-    ((QWidget*)e->child())->reparent( parentArea(), QPoint( 0, 0 ), true );
+  {
+    QWidget* wid = (QWidget*)e->child();
+    bool vis = wid->isVisibleTo( wid->parentWidget() );
+    wid->reparent( parentArea(), QPoint( 0, 0 ), vis );
+    wid->setShown( vis );
+  }
   else
     QtxMainWindow::childEvent( e );
 }