From bd8c3462c2a97a58228917a4dca039060a954330 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 7 Nov 2017 15:13:39 +0300 Subject: [PATCH] Key_Escape processing in File selector widget. Otherwise, crash happens if file dialog is opened. --- src/ModuleBase/ModuleBase_WidgetFileSelector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp index ae84af37e..ca7ee5de1 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp @@ -144,7 +144,8 @@ void ModuleBase_WidgetFileSelector::onPathSelectionBtn() myFileDialog = new QFileDialog(this, myTitle, aDefaultPath, aFilter); myFileDialog->setNameFilter(aFilter); myFileDialog->setOptions(QFileDialog::DontUseNativeDialog); - myFileDialog->setAcceptMode(myType == WFS_SAVE ? QFileDialog::AcceptSave : QFileDialog::AcceptOpen); + myFileDialog->setAcceptMode(myType == WFS_SAVE ? QFileDialog::AcceptSave + : QFileDialog::AcceptOpen); if (myFileDialog->exec() == QDialog::Accepted) { mySelectedFilter = myFileDialog->selectedNameFilter(); -- 2.39.2