From 519adfbe9a817815faf64e02cb3d209cc2eb3429 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 29 Apr 2008 12:13:19 +0000 Subject: [PATCH] Merging with BR_QT4_Dev branch. Corrections for fixing of the bug HDFE119682. --- src/Qtx/QtxWorkstack.cxx | 20 +++++++++++++++++--- src/Qtx/QtxWorkstack.h | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index db2e4ef52..27e8cdd0a 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -713,6 +713,7 @@ void QtxWorkstackArea::customEvent( QEvent* e ) switch ( we->type() ) { case ActivateWidget: + myBar->updateActiveState(); emit activated( activeWidget() ); break; case FocusWidget: @@ -725,10 +726,12 @@ void QtxWorkstackArea::customEvent( QEvent* e ) if ( activeWidget()->focusWidget()->hasFocus() ) { QFocusEvent in( QEvent::FocusIn ); - QApplication::sendEvent( this, &in ); - } - else + QApplication::sendEvent( this, &in ); + } + else { activeWidget()->focusWidget()->setFocus(); + myBar->updateActiveState(); + } } } break; @@ -748,6 +751,8 @@ void QtxWorkstackArea::focusInEvent( QFocusEvent* e ) { QFrame::focusInEvent( e ); + myBar->updateActiveState(); + emit activated( activeWidget() ); } @@ -1423,6 +1428,15 @@ void QtxWorkstackTabBar::contextMenuEvent( QContextMenuEvent* e ) emit contextMenuRequested( e->globalPos() ); } +/*! + \brief Process widget change state events (style, palette, enable state changing, etc). + \param e change event (not used) +*/ +void QtxWorkstackTabBar::changeEvent( QEvent* /*e*/ ) +{ + updateActiveState(); +} + /* void QtxWorkstackTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const { diff --git a/src/Qtx/QtxWorkstack.h b/src/Qtx/QtxWorkstack.h index 367713bf9..22425c869 100644 --- a/src/Qtx/QtxWorkstack.h +++ b/src/Qtx/QtxWorkstack.h @@ -326,6 +326,7 @@ protected: virtual void mousePressEvent( QMouseEvent* ); virtual void mouseReleaseEvent( QMouseEvent* ); virtual void contextMenuEvent( QContextMenuEvent* ); + virtual void changeEvent( QEvent* ); // virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const; -- 2.39.2