diff options
author | Andy Shaw <andy.shaw@digia.com> | 2012-12-08 00:55:11 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 23:28:34 (GMT) |
commit | b724dc51683bb250e8434c2115709a0b178736a6 (patch) | |
tree | 5d90f61f031e907b466e09298824ff5329f075ef | |
parent | 5b285845a3c3478a4008b7e3416c3912c69fd20b (diff) | |
download | Qt-b724dc51683bb250e8434c2115709a0b178736a6.zip Qt-b724dc51683bb250e8434c2115709a0b178736a6.tar.gz Qt-b724dc51683bb250e8434c2115709a0b178736a6.tar.bz2 |
Ensure the native filedialog starts up with the right directory
On Mac it was not starting the dialog with the specified directory when
one was present. If a filename was given as well then it would start up
fine.
Task-number: QTBUG-28161
Change-Id: I7cce0d065dd57e6433ce62380d4263d6e20b6e7c
Reviewed-by: Liang Qi <liang.qi@digia.com>
(cherry picked from commit d75d86190bca85841db2040d50184f4c6886ef89)
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 4c1c74b..40fca76 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -448,6 +448,8 @@ QT_USE_NAMESPACE if ([path isEqualToString:mCurrentDir]) return; + if ([mSavePanel respondsToSelector:@selector(isVisible)] && ![mSavePanel isVisible]) + return; [mCurrentDir release]; mCurrentDir = [path retain]; mPriv->QNSOpenSavePanelDelegate_directoryEntered(QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString(mCurrentDir))); |