diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 9e183feba9..12d6ef6f04 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -664,6 +664,8 @@ int PCBNEW_CONTROL::Paste( const TOOL_EVENT& aEvent ) static_cast( pastedDrawSeg )->SwapData( clipDrawSeg ); pastedDrawSeg->SetLocalCoord(); + // Replace parent nuked by above call to SwapData() + pastedDrawSeg->SetParent( editModule ); pastedItems.push_back( pastedDrawSeg ); } else if( clipDrawItem->Type() == PCB_TEXT_T ) @@ -675,6 +677,7 @@ int PCBNEW_CONTROL::Paste( const TOOL_EVENT& aEvent ) static_cast( pastedTextItem )->SwapText( *clipTextItem ); static_cast( pastedTextItem )->SwapEffects( *clipTextItem ); + pastedTextItem->SetParent( editModule ); pastedItems.push_back( pastedTextItem ); } }