Be sure to update UUID when placing new elements

Fixes https://gitlab.com/kicad/code/kicad/issues/12588
This commit is contained in:
Seth Hillbrand 2022-10-07 16:32:20 -07:00
parent 51c20da93e
commit a5da46459c
1 changed files with 1 additions and 0 deletions

View File

@ -818,6 +818,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 );