diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-10-02 16:19:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-04 19:16:32 +0200 |
commit | 5bc02ad6653252ef134f070d7e0083784e705f1e (patch) | |
tree | edfdc3d8aa40452c84316274d0f8b2d653ae9220 /src | |
parent | 4bcef03a8de5abb3f93360215e1b21da33577beb (diff) |
Cocoa: Properly unhide views after they're moved to their own window
Task-number: QTBUG-32221
Change-Id: I12a475c7a5abdc5ba4d7359d694dd62ea97e67c4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 54cf8a79fe..7bdfd12314 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -369,9 +369,12 @@ void QCocoaWindow::setVisible(bool visible) [(NSPanel *)m_nsWindow setWorksWhenModal:YES]; } } - } else { - [m_contentView setHidden:NO]; } + // In some cases, e.g. QDockWidget, the content view is hidden before moving to its own + // Cocoa window, and then shown again. Therefore, we test for the view being hidden even + // if it's attached to an NSWindow. + if ([m_contentView isHidden]) + [m_contentView setHidden:NO]; } else { // qDebug() << "close" << this; if (m_nsWindow) { |