check for selected sub-elements in sketcher copy function
This commit is contained in:
@@ -1170,6 +1170,12 @@ void SketcherCopy::activate(bool clone)
|
||||
|
||||
// get the needed lists and objects
|
||||
const std::vector<std::string> &SubNames = selection[0].getSubNames();
|
||||
if (SubNames.empty()) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select elements from a single sketch."));
|
||||
return;
|
||||
}
|
||||
|
||||
Sketcher::SketchObject* Obj = static_cast<Sketcher::SketchObject*>(selection[0].getObject());
|
||||
|
||||
getSelection().clearSelection();
|
||||
|
||||
Reference in New Issue
Block a user