Eeschema: fix a draw issue when aborting a move symbol field or a sheet pin.

The initial drawings were not updated, making the moved item invisible on screen.

Fixes: lp:1800142
https://bugs.launchpad.net/kicad/+bug/1800142
This commit is contained in:
jean-pierre charras 2018-10-26 15:26:52 +02:00
parent 0e0b4d52a2
commit b075e76ede
1 changed files with 5 additions and 2 deletions

View File

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