Update pasted items' parent pointers.

Fixes crashes when trying to manipulate the item after the paste,
and weird redraw behaviour with pins.

Fixes: lp:1832178
* https://bugs.launchpad.net/kicad/+bug/1832178
This commit is contained in:
Jeff Young 2019-06-11 09:21:40 +01:00
parent 9f427da56f
commit 09a3c5b280
1 changed files with 1 additions and 0 deletions

View File

@ -618,6 +618,7 @@ int LIB_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
continue;
LIB_ITEM* newItem = (LIB_ITEM*) item.Clone();
newItem->SetParent( part );
newItem->SetFlags( IS_NEW | IS_PASTED | SELECTED );
part->GetDrawItems().push_back( newItem );