Browse Source

Add items to repeat_items after paste (or duplicate).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15556
newinvert
Jeff Young 2 years ago
parent
commit
f6e238dc3f
  1. 4
      eeschema/tools/sch_drawing_tools.cpp
  2. 3
      eeschema/tools/sch_move_tool.cpp

4
eeschema/tools/sch_drawing_tools.cpp

@ -154,8 +154,6 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
auto addSymbol =
[this]( SCH_SYMBOL* aSymbol )
{
m_frame->SaveCopyForRepeatItem( aSymbol );
m_toolMgr->RunAction( EE_ACTIONS::clearSelection );
m_selectionTool->AddItemToSel( aSymbol );
@ -356,6 +354,8 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
if( m_frame->eeconfig()->m_AutoplaceFields.enable )
symbol->AutoplaceFields( screen, false /* aManual */ );
m_frame->SaveCopyForRepeatItem( symbol );
SCH_COMMIT commit( m_toolMgr );
commit.Added( symbol, screen );

3
eeschema/tools/sch_move_tool.cpp

@ -916,6 +916,9 @@ bool SCH_MOVE_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aComm
sch_item->SetConnectivityDirty( 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…
Cancel
Save