From 612de25259df7dd0729221a90472cbe4061ac1cc Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 6 Jun 2005 04:22:50 +0000 Subject: [PATCH] Bug fix: Empty toolbars not hided automaticaly. Modified function: updateVisibility() --- src/Qtx/QtxDockWindow.cxx | 8 ++++---- src/Qtx/QtxToolBar.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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(); } -- 2.39.2