From fdc3772c25c2d0ac9a62e28608af1d83f1de4f3f Mon Sep 17 00:00:00 2001 From: Sergo Date: Sun, 5 Mar 2017 14:59:29 -0500 Subject: [PATCH] stop dressup features when applied to non-acitve body --- 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 b8600a487..a6e3f987b 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -1275,7 +1275,6 @@ bool dressupGetSelected(Gui::Command* cmd, const std::string& which, return false; std::vector selection = cmd->getSelection().getSelectionEx(); - selection = cmd->getSelection().getSelectionEx(); if (selection.size() == 0) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), @@ -1286,6 +1285,11 @@ bool dressupGetSelected(Gui::Command* cmd, const std::string& which, QObject::tr("Select an edge, face or body from a single body.")); return false; } + else if (pcActiveBody != PartDesignGui::getBodyFor(selection[0].getObject(), false)) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Selection is not in Active Body"), + QObject::tr("Select an edge, face or body from an active body.")); + return false; + } Gui::Selection().clearSelection();