diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-09-16 11:39:25 (GMT) |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-09-16 11:57:35 (GMT) |
commit | 922c87a3b8ab16b18b2f04c114f6d20ba12e4eb9 (patch) | |
tree | ea67de8de6119befb06cf3ce16b8f129af56bc3f /src/gui | |
parent | 5f0f5dd371cb5fbd1ae1cb8f7b6f03c0109d2d6c (diff) | |
download | Qt-922c87a3b8ab16b18b2f04c114f6d20ba12e4eb9.zip Qt-922c87a3b8ab16b18b2f04c114f6d20ba12e4eb9.tar.gz Qt-922c87a3b8ab16b18b2f04c114f6d20ba12e4eb9.tar.bz2 |
OSX: make QFileDialog::getSaveFileName honor the initial file name.
Since OSX 10.9 the NSSavePanel will call panelSelectionDidChange on the
delegate when the selection is changed programmatically, even when the
panel is not (yet) visible. This overwrites the selected file name
with the default "Untitled" before we'd set it in
runApplicationModalPanel. The fix is to check if panelSelectionDidChange
is called before it is shown.
Change-Id: I9ad6cd3afddc0aac35baebab31fd85cd7bf3f9e9
Task-number: QTBUG-36212
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index da15a61..0ba4e4a 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -459,7 +459,7 @@ QT_USE_NAMESPACE - (void)panelSelectionDidChange:(id)sender { Q_UNUSED(sender); - if (mPriv) { + if (mPriv && [mSavePanel isVisible]) { QString selection = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString([mSavePanel filename])); if (selection != mCurrentSelection) { *mCurrentSelection = selection; |