From 3465ac3add08f0ab1a35e79d0cb8d808c30aa40d Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 24 Nov 2021 21:28:32 +0100 Subject: [PATCH] Gui: [skip ci] do not trigger on_fileChooser_fileNameChanged when opening macro dialog --- src/Gui/DlgMacroExecuteImp.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index c40f3d9a72..952d56f902 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -28,6 +28,7 @@ # include # include # include +# include #endif #include "DlgMacroExecuteImp.h" @@ -84,10 +85,13 @@ DlgMacroExecuteImp::DlgMacroExecuteImp( QWidget* parent, Qt::WindowFlags fl ) { ui->setupUi(this); // retrieve the macro path from parameter or use the user data as default - std::string path = getWindowParameter()->GetASCII("MacroPath", - App::Application::getUserMacroDir().c_str()); - this->macroPath = QString::fromUtf8(path.c_str()); - ui->fileChooser->setFileName(this->macroPath); + { + QSignalBlocker blocker(ui->fileChooser); + std::string path = getWindowParameter()->GetASCII("MacroPath", + App::Application::getUserMacroDir().c_str()); + this->macroPath = QString::fromUtf8(path.c_str()); + ui->fileChooser->setFileName(this->macroPath); + } // Fill the List box QStringList labels; labels << tr("Macros");