[Sketcher] If origin selected: don't do distance to origin
In auto constrainer. Fixes #12684
This commit is contained in:
committed by
Chris Hennes
parent
502f3182f8
commit
35d5259c31
@@ -1812,9 +1812,13 @@ protected:
|
||||
{
|
||||
//distance, lock
|
||||
if (availableConstraint == AvailableConstraint::FIRST) {
|
||||
selAllowed = true;
|
||||
if(selPoints[0].GeoId == Sketcher::GeoEnum::RtPnt) {
|
||||
// Cannot do distance to origin if origin selected
|
||||
return;
|
||||
}
|
||||
restartCommand(QT_TRANSLATE_NOOP("Command", "Add 'Distance to origin' constraint"));
|
||||
createDistanceConstrain(selPoints[0].GeoId, selPoints[0].PosId, Sketcher::GeoEnum::RtPnt, Sketcher::PointPos::start, onSketchPos);
|
||||
selAllowed = true;
|
||||
}
|
||||
if (availableConstraint == AvailableConstraint::SECOND) {
|
||||
restartCommand(QT_TRANSLATE_NOOP("Command", "Add lock constraint"));
|
||||
|
||||
Reference in New Issue
Block a user