Pcbnew fix: Select/Expand Connection can be used only once on the same segment

Was due to a incorrect cleared flag in calculations.

Fixes #4767
https://gitlab.com/kicad/code/kicad/issues/4767
This commit is contained in:
jean-pierre charras 2020-07-05 11:37:42 +02:00
parent e9b99cc8b7
commit 1463dd10b2
1 changed files with 7 additions and 1 deletions

View File

@ -881,23 +881,26 @@ void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem,
trackMap[ track->GetEnd() ].push_back( track ); trackMap[ track->GetEnd() ].push_back( track );
} }
break; break;
case PCB_VIA_T: case PCB_VIA_T:
{ {
VIA* via = static_cast<VIA*>( item ); VIA* via = static_cast<VIA*>( item );
viaMap[ via->GetStart() ] = via; viaMap[ via->GetStart() ] = via;
} }
break; break;
case PCB_PAD_T: case PCB_PAD_T:
{ {
D_PAD* pad = static_cast<D_PAD*>( item ); D_PAD* pad = static_cast<D_PAD*>( item );
padMap[ pad->GetPosition() ] = pad; padMap[ pad->GetPosition() ] = pad;
} }
break; break;
default: default:
break; break;
} }
item->SetFlags( SKIP_STRUCT ); item->SetState( SKIP_STRUCT, false );
} }
std::vector<wxPoint> activePts; std::vector<wxPoint> activePts;
@ -909,12 +912,15 @@ void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem,
activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetStart() ); activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetStart() );
activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetEnd() ); activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetEnd() );
break; break;
case PCB_VIA_T: case PCB_VIA_T:
activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetStart() ); activePts.push_back( static_cast<TRACK*>( &aStartItem )->GetStart() );
break; break;
case PCB_PAD_T: case PCB_PAD_T:
activePts.push_back( aStartItem.GetPosition() ); activePts.push_back( aStartItem.GetPosition() );
break; break;
default: default:
break; break;
} }