mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Make auto-created labels work with new multi-create architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21306
This commit is contained in:
parent
e1a6261df5
commit
5fb40f152c
@ -1766,8 +1766,11 @@ bool SCH_DRAWING_TOOLS::createNewLabel( const VECTOR2I& aPosition, int aType,
|
||||
m_lastNetClassFlagShape = labelItem->GetShape();
|
||||
}
|
||||
|
||||
// Return elements are kept in aLabelList
|
||||
delete labelItem;
|
||||
if( aLabelList.empty() )
|
||||
aLabelList.push_back( std::unique_ptr<SCH_LABEL_BASE>( labelItem ) );
|
||||
else // DIALOG_LABEL_PROPERTIES already filled in aLabelList; labelItem is extraneous to needs
|
||||
delete labelItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user