summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qfiledialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index d9bec27..4af5688 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -399,9 +399,13 @@ QT_USE_NAMESPACE
- (void)panelSelectionDidChange:(id)sender
{
Q_UNUSED(sender);
- *mCurrentSelection = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString([mSavePanel filename]));
- if (mPriv)
- mPriv->QNSOpenSavePanelDelegate_selectionChanged(*mCurrentSelection);
+ if (mPriv) {
+ QString selection = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString([mSavePanel filename]));
+ if (selection != mCurrentSelection) {
+ *mCurrentSelection = selection;
+ mPriv->QNSOpenSavePanelDelegate_selectionChanged(selection);
+ }
+ }
}
- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo