From e9abb6eb49772e9a35ddf80dab883e6e3069d92b Mon Sep 17 00:00:00 2001 From: sln Date: Thu, 12 Apr 2007 13:39:42 +0000 Subject: [PATCH] QtxWorkstackArea::removeWidget method updated. Now if active window is removed then activated( activeWidget() )signal is emited in order to notify QtxWorkstack about change of active window --- src/Qtx/QtxWorkstack.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index b2e3d8afe..48514b4a5 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -1655,6 +1655,8 @@ void QtxWorkstackArea::removeWidget( QWidget* wid, const bool del ) if ( !myList.contains( wid ) ) return; + bool wasActive = wid == workstack()->activeWindow(); + if ( myBar->tab( widgetId( wid ) ) ) myBar->removeTab( myBar->tab( widgetId( wid ) ) ); myStack->removeWidget( child( wid ) ); @@ -1666,13 +1668,19 @@ void QtxWorkstackArea::removeWidget( QWidget* wid, const bool del ) if( del ) { delete child( wid ); - if( myList.isEmpty() ) + if ( myList.isEmpty() ) + { + wasActive = false; delete this; + } else updateState(); } else updateState(); + + if ( wasActive ) + emit activated( activeWidget() ); } /*! -- 2.39.2