From 2565ef5f69359e1e192225efdad262fe47a438d8 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 20 Feb 2021 18:53:59 +0100 Subject: [PATCH] PD: in setEdit() helper function make sure that recorded macro is handled as Gui command --- src/Mod/PartDesign/Gui/Utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Utils.cpp b/src/Mod/PartDesign/Gui/Utils.cpp index c1d88ab155..19536e3cfe 100644 --- a/src/Mod/PartDesign/Gui/Utils.cpp +++ b/src/Mod/PartDesign/Gui/Utils.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -85,8 +86,10 @@ bool setEdit(App::DocumentObject *obj, PartDesign::Body *body) { subname += obj->getNameInDocument(); subname += '.'; } - _FCMD_OBJ_DOC_CMD(Gui,parent,"setEdit(" << Gui::Command::getObjectCmd(parent) - << ",0,'" << subname << "')"); + + Gui::cmdGuiDocument(parent, std::ostringstream() << "setEdit(" + << Gui::Command::getObjectCmd(parent) + << ", 0, '" << subname << "')"); return true; }