Don't leave hidden flag when undoing/redoing.

It was probably set because the image object was in the selection.
We're going to rebuild the selection to set all the flag right
anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/6005
This commit is contained in:
Jeff Young 2020-10-14 18:29:57 +01:00
parent d339979c28
commit ae8239a4f2
1 changed files with 3 additions and 2 deletions

View File

@ -465,12 +465,13 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool
// Remove all pads/drawings/texts, as they become invalid
// for the VIEW after SwapData() called for modules
view->Remove( eda_item );
view->Remove( item );
connectivity->Remove( item );
SwapItemData( item, image );
view->Add( eda_item );
view->Add( item );
view->Hide( item, false );
connectivity->Add( item );
item->GetBoard()->OnItemChanged( item );
}