diff options
author | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-07-23 15:03:42 (GMT) |
---|---|---|
committer | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-07-23 22:51:52 (GMT) |
commit | 725d8e061ededee9a5ddf0914aabd0f6aa2ee741 (patch) | |
tree | 7c386849784b096fbec3ab23d73e7979f60cb7bd /src/gui/kernel | |
parent | b0e73713e0142ac1045b4c91c7fe55e8e965b7c2 (diff) | |
download | Qt-725d8e061ededee9a5ddf0914aabd0f6aa2ee741.zip Qt-725d8e061ededee9a5ddf0914aabd0f6aa2ee741.tar.gz Qt-725d8e061ededee9a5ddf0914aabd0f6aa2ee741.tar.bz2 |
Drawer widget in a MainWindow disappears after returning from full screen mode.
The problem was in the toggleDrawer function. We were not checking the
status of the last transition before setting the new transition, so
all the transition were treated as non-intentional.
Task-number: QTBUG-11373
Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index c788711..8ae6a99 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -1599,12 +1599,14 @@ void QWidgetPrivate::toggleDrawers(bool visible) continue; QWidget *widget = static_cast<QWidget*>(object); if(qt_mac_is_macdrawer(widget)) { + bool oldState = widget->testAttribute(Qt::WA_WState_ExplicitShowHide); if(visible) { if (!widget->testAttribute(Qt::WA_WState_ExplicitShowHide)) widget->show(); } else { widget->hide(); - widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false); + if(!oldState) + widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false); } } } |