From 44c444bf2fd2a6cbf57ab0b8de554dfd2bd6c52c Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 20 Feb 2021 19:01:11 +0100 Subject: [PATCH] Gui: Running a command with Gui.runCommand() must always be considered as Gui command --- src/Gui/Command.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index e5a735232b..03120743da 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -422,10 +422,7 @@ void Command::invoke(int i, TriggerSource trigger) // Cancel the above pending line first pending.cancel(); ss << "Gui.runCommand('" << sName << "'," << i << ')'; - if(eType & AlterDoc) - manager->addLine(MacroManager::App, ss.str().c_str()); - else - manager->addLine(MacroManager::Gui, ss.str().c_str()); + manager->addLine(MacroManager::Gui, ss.str().c_str()); }else{ // In case the command has any output to the console, lets // mark the end of the command here