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:
Jeff Young 2021-12-10 23:06:32 +00:00
parent 1b2a278de9
commit 8c5dd46861
1 changed files with 2 additions and 0 deletions

View File

@ -870,6 +870,7 @@ int EE_POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
}
}
saveItemsToUndo();
poly.Insert( closestLineStart, pos );
updateItem( shape, true );
@ -890,6 +891,7 @@ int EE_POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
if( poly.GetPointCount() < 3 )
return 0;
saveItemsToUndo();
poly.Remove( getEditedPointIndex() );
updateItem( shape, true );