summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-07 12:01:26 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-07 12:02:41 (GMT)
commitf37b4ab8c8116abc2f71128e308b938c90ec5b8a (patch)
tree0953911320c8d52603f43bf2948792a9aeee8852 /src/gui
parent3c2b9047be4f4f835e59c13d5038b907c629451f (diff)
downloadQt-f37b4ab8c8116abc2f71128e308b938c90ec5b8a.zip
Qt-f37b4ab8c8116abc2f71128e308b938c90ec5b8a.tar.gz
Qt-f37b4ab8c8116abc2f71128e308b938c90ec5b8a.tar.bz2
QDockWidget: Make visibilityChanged more accurate
Task-number: 258459
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qdockarealayout.cpp2
-rw-r--r--src/gui/widgets/qdockwidget.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index ee29b55..cad6903 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -1545,7 +1545,7 @@ void QDockAreaLayoutInfo::apply(bool animate)
QRect geo = w->geometry();
widgetAnimator.animate(w, r, animate);
- if (!w->isHidden()) {
+ if (!w->isHidden() && w->window()->isVisible()) {
QDockWidget *dw = qobject_cast<QDockWidget*>(w);
if (!r.isValid() && geo.right() >= 0 && geo.bottom() >= 0) {
dw->lower();
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index 5810c81..e60f099 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1390,7 +1390,7 @@ bool QDockWidget::event(QEvent *event)
break;
case QEvent::Show:
d->toggleViewAction->setChecked(true);
- emit visibilityChanged(true);
+ emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
break;
#endif
case QEvent::ApplicationLayoutDirectionChange: