Clean up view when aborting move item.

Fixes: lp:1809444
* https://bugs.launchpad.net/kicad/+bug/1809444
This commit is contained in:
Jeff Young 2018-12-21 20:31:51 +00:00
parent 6eca924365
commit 51e6f56300
1 changed files with 4 additions and 1 deletions

View File

@ -740,9 +740,12 @@ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
// Never delete existing item, because it can be referenced by an undo/redo command // Never delete existing item, because it can be referenced by an undo/redo command
// Just restore its data // Just restore its data
view->Remove( item );
currentItem->SwapData( oldItem ); currentItem->SwapData( oldItem );
view->Hide( item, false );
item->ClearFlags(); item->ClearFlags();
view->Add( item );
view->Hide( item, false );
// for items managed by their parent, we have to refresh // for items managed by their parent, we have to refresh
// the parent drawings (scheet or symbol) // the parent drawings (scheet or symbol)