Skip to content

Commit

Permalink
Lock doesn't complain "no selection"
Browse files Browse the repository at this point in the history
  • Loading branch information
AjinkyaDahale authored and wwmayer committed Jan 4, 2017
1 parent 670e59e commit 75ad582
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Sketcher/Gui/CommandConstraints.cpp
Expand Up @@ -1123,8 +1123,8 @@ void CmdSketcherConstrainLock::activated(int iMsg)

// only one sketch with its subelements are allowed to be selected
if (selection.size() != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select entities from the sketch."));
// QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
// QObject::tr("Select entities from the sketch."));
return;
}

Expand All @@ -1135,6 +1135,8 @@ void CmdSketcherConstrainLock::activated(int iMsg)
if (SubNames.size() != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select exactly one entity from the sketch."));
// clear the selection (convenience)
getSelection().clearSelection();
return;
}

Expand All @@ -1145,6 +1147,8 @@ void CmdSketcherConstrainLock::activated(int iMsg)
if (isEdge(GeoId,PosId) || (GeoId < 0 && GeoId >= Sketcher::GeoEnum::VAxis)) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select one vertex from the sketch other than the origin."));
// clear the selection (convenience)
getSelection().clearSelection();
return;
}

Expand Down

0 comments on commit 75ad582

Please sign in to comment.