From 516a979cf20d77df429433e7595f32a934f6c9fe Mon Sep 17 00:00:00 2001 From: Sergo Date: Wed, 1 Mar 2017 01:25:30 -0500 Subject: [PATCH] fixing dressup features --- src/Mod/PartDesign/Gui/Command.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index af28798c9d..52094e8298 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -1264,6 +1264,14 @@ bool CmdPartDesignSubtractiveLoft::isActive(void) bool dressupGetSelected(Gui::Command* cmd, const std::string& which, Gui::SelectionObject &selected) { + App::Document *doc = cmd->getDocument(); + PartDesign::Body *pcActiveBody = PartDesignGui::getBody( + /*messageIfNot = */ PartDesignGui::assureModernWorkflow(doc)); + + // No PartDesign feature without Body past FreeCAD 0.16 + if (!pcActiveBody && PartDesignGui::isModernWorkflow(doc)) + return false; + std::vector selection = cmd->getSelection().getSelectionEx(); selection = cmd->getSelection().getSelectionEx();