stop dressup features when applied to non-acitve body

This commit is contained in:
Sergo 2017-03-05 14:59:29 -05:00 committed by Yorik van Havre
parent 1d8ef64925
commit fdc3772c25

View File

@ -1275,7 +1275,6 @@ bool dressupGetSelected(Gui::Command* cmd, const std::string& which,
return false;
std::vector<Gui::SelectionObject> 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();