Make "Toggle Reference" remember undo state.
Turning a reference dimension into a constraint one can make the sketch unsolvable, which suggests Edit → Undo, which would undo either too much or nothing at all.
This commit is contained in:
parent
e0fa99bad4
commit
56e2592e2a
@ -558,6 +558,7 @@ void Constraint::MenuConstrain(Command id) {
|
|||||||
if(gs.constraints == 1 && gs.n == 0) {
|
if(gs.constraints == 1 && gs.n == 0) {
|
||||||
Constraint *c = SK.GetConstraint(gs.constraint[0]);
|
Constraint *c = SK.GetConstraint(gs.constraint[0]);
|
||||||
if(c->HasLabel() && c->type != Type::COMMENT) {
|
if(c->HasLabel() && c->type != Type::COMMENT) {
|
||||||
|
SS.UndoRemember();
|
||||||
(c->reference) = !(c->reference);
|
(c->reference) = !(c->reference);
|
||||||
SS.MarkGroupDirty(c->group, /*onlyThis=*/true);
|
SS.MarkGroupDirty(c->group, /*onlyThis=*/true);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user