From 5b21746da4899a7d6dd78cf949e0a918c127fd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Wed, 26 Aug 2009 13:13:36 +0200 Subject: Fix a freeze in QFileDialog (Mac) Running an open file dialog, for example with QFileDialog::getOpenFileName() can lead to a freeze if the user selects a folder, then selects a file in the parent folder and finally confirms the open dialog. Merge-request: 1327 Reviewed-by: Richard Moe Gustavsen --- src/gui/dialogs/qfiledialog_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 3914ab1f7c..8bca0253b9 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -819,8 +819,8 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess || mode == QFileDialog::ExistingFiles){ // When changing directory, the current selection is cleared if // we are supposed to be selecting files only: - fileDialogPrivate->mCurrentSelectionList.clear(); if (!fileDialogPrivate->mCurrentSelection.isEmpty()){ + fileDialogPrivate->mCurrentSelectionList.clear(); fileDialogPrivate->mCurrentSelection.clear(); emit fileDialogPrivate->q_func()->currentChanged(fileDialogPrivate->mCurrentSelection); } -- cgit v1.2.3