From f411390d33e9ab9b7eeb09736abb0cc36b4cbdc1 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 8 Oct 2021 17:45:59 +0200 Subject: [PATCH] PD: do not set ReferenceAxis when no profile is used to pad a face --- src/Mod/PartDesign/Gui/Command.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 83b13b9874..8a52a037c7 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -1257,7 +1258,10 @@ void CmdPartDesignPad::activated(int iMsg) Part::Part2DObject* sketch = dynamic_cast(profile); - FCMD_OBJ_CMD(Feat, "ReferenceAxis = (" << getObjectCmd(sketch) << ",['N_Axis'])"); + if (sketch) { + std::ostringstream str; + Gui::cmdAppObject(Feat, str << "ReferenceAxis = (" << getObjectCmd(sketch) << ",['N_Axis'])"); + } finishProfileBased(cmd, sketch, Feat); cmd->adjustCameraPosition();