Undo for SCH add/remove corner.
(PCB_POINT_EDITOR uses a BOARD_COMMIT and so already handles undo.) Fixes https://gitlab.com/kicad/code/kicad/issues/9925
This commit is contained in:
parent
1b2a278de9
commit
8c5dd46861
|
@ -870,6 +870,7 @@ int EE_POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveItemsToUndo();
|
||||||
poly.Insert( closestLineStart, pos );
|
poly.Insert( closestLineStart, pos );
|
||||||
|
|
||||||
updateItem( shape, true );
|
updateItem( shape, true );
|
||||||
|
@ -890,6 +891,7 @@ int EE_POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
|
||||||
if( poly.GetPointCount() < 3 )
|
if( poly.GetPointCount() < 3 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
saveItemsToUndo();
|
||||||
poly.Remove( getEditedPointIndex() );
|
poly.Remove( getEditedPointIndex() );
|
||||||
|
|
||||||
updateItem( shape, true );
|
updateItem( shape, true );
|
||||||
|
|
Loading…
Reference in New Issue