From: stv Date: Mon, 6 Jun 2005 04:22:50 +0000 (+0000) Subject: Bug fix: Empty toolbars not hided automaticaly. Modified function: updateVisibility() X-Git-Tag: T3_0_0_a1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=612de25259df7dd0729221a90472cbe4061ac1cc;p=modules%2Fgui.git Bug fix: Empty toolbars not hided automaticaly. Modified function: updateVisibility() --- diff --git a/src/Qtx/QtxDockWindow.cxx b/src/Qtx/QtxDockWindow.cxx index e87e07a11..1fc289fe7 100644 --- a/src/Qtx/QtxDockWindow.cxx +++ b/src/Qtx/QtxDockWindow.cxx @@ -158,10 +158,10 @@ void QtxDockWindow::Watcher::updateVisibility() vis = it.current()->widget() && it.current()->widget()->isVisibleTo( myCont ); QMainWindow* mw = myCont->mainWindow(); - if ( mw && myEmpty != vis ) + if ( mw && myEmpty == vis ) { - myEmpty = vis; - if ( myEmpty ) + myEmpty = !vis; + if ( !myEmpty ) mw->setAppropriate( myCont, myState ); else { @@ -170,7 +170,7 @@ void QtxDockWindow::Watcher::updateVisibility() } } - vis = myEmpty && myVisible; + vis = !myEmpty && myVisible; if ( vis != myCont->isVisibleTo( myCont->parentWidget() ) ) vis ? showContainer() : hideContainer(); } diff --git a/src/Qtx/QtxToolBar.cxx b/src/Qtx/QtxToolBar.cxx index 311f1deb3..d1b888f10 100644 --- a/src/Qtx/QtxToolBar.cxx +++ b/src/Qtx/QtxToolBar.cxx @@ -180,10 +180,10 @@ void QtxToolBar::Watcher::updateVisibility() } QMainWindow* mw = myCont->mainWindow(); - if ( mw && myEmpty != vis ) + if ( mw && myEmpty == vis ) { - myEmpty = vis; - if ( myEmpty ) + myEmpty = !vis; + if ( !myEmpty ) mw->setAppropriate( myCont, myState ); else { @@ -192,7 +192,7 @@ void QtxToolBar::Watcher::updateVisibility() } } - vis = myEmpty && myVisible; + vis = !myEmpty && myVisible; if ( vis != myCont->isVisibleTo( myCont->parentWidget() ) ) vis ? showContainer() : hideContainer(); }