Clear caches before undo operation.
The undo will remove/re-add items to the view in order to update the RTree. However, if we only clear caches at the end (in the OnModify call), then the (stale) bbox caches are still used for the re-add operation, and they end up at the wrong place in the RTree. Fixes https://gitlab.com/kicad/code/kicad/issues/13048
This commit is contained in:
parent
93c631af44
commit
bba8a0826e
|
@ -381,6 +381,8 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
|||
|
||||
PCB_GROUP* group = nullptr;
|
||||
|
||||
GetBoard()->IncrementTimeStamp(); // clear caches
|
||||
|
||||
// Undo in the reverse order of list creation: (this can allow stacked changes
|
||||
// like the same item can be changes and deleted in the same complex command
|
||||
|
||||
|
|
Loading…
Reference in New Issue