From 7024bc70917b6837e2d1e37b1d52350a28d978c5 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 14 Jan 2013 13:39:28 +0100 Subject: [PATCH] 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 --- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 8e1c92b235..22fbf80bfe 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -218,6 +218,8 @@ static QString strippedText(QString s) *mCurrentSelection = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]); if ([mSavePanel respondsToSelector:@selector(closePanel:)]) [mSavePanel close]; + if ([mSavePanel isSheet]) + [NSApp endSheet: mSavePanel]; } - (void)showModelessPanel