From f224e4183aa0f17325d66fcd50407685394f4e0d Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 21 Nov 2005 13:43:25 +0000 Subject: [PATCH] Don't allow to show hidden child widgets. --- src/SUIT/SUIT_Desktop.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ); } -- 2.39.2