Clear bounding box caches *before* reverting commit.

We're going to re-add items to the view assuming they will have their
current locations, which requires the bounding boxes to be refreshed.

Fixes https://gitlab.com/kicad/code/kicad/issues/13084
This commit is contained in:
Jeff Young 2022-12-10 22:05:33 +00:00
parent 690bcc0890
commit a7df573748
1 changed files with 2 additions and 0 deletions

View File

@ -626,6 +626,8 @@ void BOARD_COMMIT::Revert()
BOARD* board = (BOARD*) m_toolMgr->GetModel();
std::shared_ptr<CONNECTIVITY_DATA> connectivity = board->GetConnectivity();
board->IncrementTimeStamp(); // clear caches
std::vector<BOARD_ITEM*> bulkAddedItems;
std::vector<BOARD_ITEM*> bulkRemovedItems;
std::vector<BOARD_ITEM*> itemsChanged;