From: stv Date: Mon, 21 Nov 2005 13:43:25 +0000 (+0000) Subject: Don't allow to show hidden child widgets. X-Git-Tag: BR_3_1_0_deb~63 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f224e4183aa0f17325d66fcd50407685394f4e0d;p=modules%2Fgui.git Don't allow to show hidden child widgets. --- diff --git a/src/SUIT/SUIT_Desktop.cxx b/src/SUIT/SUIT_Desktop.cxx index 25d5da977..3d41900db 100755 --- a/src/SUIT/SUIT_Desktop.cxx +++ b/src/SUIT/SUIT_Desktop.cxx @@ -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 ); }