]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Merging with BR_QT4_Dev branch.
authornds <nds@opencascade.com>
Tue, 29 Apr 2008 12:13:19 +0000 (12:13 +0000)
committernds <nds@opencascade.com>
Tue, 29 Apr 2008 12:13:19 +0000 (12:13 +0000)
Corrections for fixing of the bug HDFE119682.

src/Qtx/QtxWorkstack.cxx
src/Qtx/QtxWorkstack.h

index db2e4ef528b6ff4fea887866abdf6b16e679abb2..27e8cdd0a6c8adb732e7f83938d8c6c9f77a899a 100644 (file)
@@ -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
 {
index 367713bf92580f29018b85a1de6372bf7414cce4..22425c869dcb84d51598b5bbd917e20e4d7a415d 100644 (file)
@@ -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;