From 128426e33ae4f7a024cc0cb38b44ecaf8b3d18e1 Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 8 Sep 2006 12:41:27 +0000 Subject: [PATCH] Method setWidget() first time set caption and icon --- src/Qtx/QtxDockWindow.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Qtx/QtxDockWindow.cxx b/src/Qtx/QtxDockWindow.cxx index 1a9f5d07d..da6f5cc55 100644 --- a/src/Qtx/QtxDockWindow.cxx +++ b/src/Qtx/QtxDockWindow.cxx @@ -285,7 +285,16 @@ QtxDockWindow::~QtxDockWindow() void QtxDockWindow::setWidget( QWidget* wid ) { if ( wid ) - wid->reparent( this, QPoint( 0, 0 ), wid->isVisibleTo( wid->parentWidget() ) ); + { + if ( wid->parentWidget() != this ) + wid->reparent( this, QPoint( 0, 0 ), wid->isVisibleTo( wid->parentWidget() ) ); + if ( myWatcher ) + { + setCaption( wid->caption() ); + if ( wid->icon() ) + setIcon( *wid->icon() ); + } + } QDockWindow::setWidget( wid ); } -- 2.39.2