Be sure to update UUID when placing new elements

Fixes https://gitlab.com/kicad/code/kicad/issues/12588

(cherry picked from commit a5da46459c)
This commit is contained in:
Seth Hillbrand 2022-10-07 16:32:20 -07:00 committed by Jeff Young
parent de9ae28bdb
commit af159c9841
1 changed files with 1 additions and 0 deletions

View File

@ -750,6 +750,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
}
SCH_ITEM* newItem = static_cast<SCH_ITEM*>( previewItem->Clone() );
const_cast<KIID&>( newItem->m_Uuid ) = KIID();
newItem->SetPosition( cursorPos );
newItem->SetFlags( IS_NEW );