Add items to repeat_items after paste (or duplicate).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15556
(cherry picked from commit f6e238dc3f
)
This commit is contained in:
parent
93fdd35b31
commit
5c456370d9
|
@ -149,8 +149,6 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
auto addSymbol =
|
||||
[&]( SCH_SYMBOL* aSymbol )
|
||||
{
|
||||
m_frame->SaveCopyForRepeatItem( aSymbol );
|
||||
|
||||
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
m_selectionTool->AddItemToSel( aSymbol );
|
||||
|
||||
|
@ -343,6 +341,8 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
if( m_frame->eeconfig()->m_AutoplaceFields.enable )
|
||||
symbol->AutoplaceFields( /* aScreen */ nullptr, /* aManual */ false );
|
||||
|
||||
m_frame->SaveCopyForRepeatItem( symbol );
|
||||
|
||||
symbol->ClearEditFlags();
|
||||
m_view->Update( symbol );
|
||||
m_frame->GetScreen()->Update( symbol );
|
||||
|
|
|
@ -924,6 +924,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
for( EDA_ITEM* item : selection )
|
||||
updateItem( item, true );
|
||||
|
||||
if( selection.GetSize() == 1 && selection.Front()->IsNew() )
|
||||
m_frame->SaveCopyForRepeatItem( static_cast<SCH_ITEM*>( selection.Front() ) );
|
||||
|
||||
m_selectionTool->RemoveItemsFromSel( &m_dragAdditions, QUIET_MODE );
|
||||
|
||||
// If we move items away from a junction, we _may_ want to add a junction there
|
||||
|
|
Loading…
Reference in New Issue