From 9c2c59b7b81e0d3b6cd7d765b2b50f4667187c5c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 14 Jan 2013 13:39:28 +0100 Subject: Call endSheet when the QFileDialog was shown as a sheet on Mac If the sheet is not ended then subseqent calls to show a sheet will not work correctly. Change-Id: Ib8a43a1c96a3dadff196c433e822f7579ad87b8b Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 7024bc70917b6837e2d1e37b1d52350a28d978c5) Reviewed-by: Laszlo Papp --- src/gui/dialogs/qfiledialog_mac.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 5628d06..982d5e6 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -228,6 +228,8 @@ QT_USE_NAMESPACE *mCurrentSelection = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)([mSavePanel filename]); if ([mSavePanel respondsToSelector:@selector(close)]) [mSavePanel close]; + if ([mSavePanel isSheet]) + [NSApp endSheet: mSavePanel]; } - (void)showModelessPanel -- cgit v0.12