mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Avoid doubly-inserting wires when repeating
The repeat key should only insert one copy. We don't want to depend on later cleanup
This commit is contained in:
parent
b6b8a6d465
commit
cea77b7e9b
@ -1237,6 +1237,9 @@ void SCH_LINE_WIRE_BUS_TOOL::finishSegments( SCH_COMMIT& aCommit )
|
||||
aCommit.Added( m_busUnfold.label, screen );
|
||||
m_frame->AddCopyForRepeatItem( m_busUnfold.label );
|
||||
m_busUnfold.label->ClearEditFlags();
|
||||
|
||||
if( !m_wires.empty() )
|
||||
m_frame->AddCopyForRepeatItem( m_wires[0] );
|
||||
}
|
||||
else if( !m_wires.empty() )
|
||||
{
|
||||
@ -1246,10 +1249,6 @@ void SCH_LINE_WIRE_BUS_TOOL::finishSegments( SCH_COMMIT& aCommit )
|
||||
for( size_t ii = 1; ii < m_wires.size(); ++ii )
|
||||
m_frame->AddCopyForRepeatItem( m_wires[ii] );
|
||||
|
||||
// Get the last non-null wire (this is the last created segment).
|
||||
if( !m_wires.empty() )
|
||||
m_frame->AddCopyForRepeatItem( m_wires.back() );
|
||||
|
||||
// Add the new wires
|
||||
for( SCH_LINE* wire : m_wires )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user