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();