Honor locking in cleanup ops

Assume that the user has locked tracks/vias for a reason and would very
much like them to remain in place, regardless of the operation

Fixes https://gitlab.com/kicad/code/kicad/issues/7562
This commit is contained in:
Seth Hillbrand 2021-02-16 10:20:03 -08:00
parent 24795f5b12
commit fb5cd22cd0
1 changed files with 10 additions and 0 deletions

View File

@ -81,6 +81,10 @@ void TRACKS_CLEANER::removeShortingTrackSegments()
for( TRACK* segment : m_brd->Tracks() )
{
// Assume that the user knows what they are doing
if( segment->IsLocked() )
continue;
for( PAD* testedPad : connectivity->GetConnectedPads( segment ) )
{
if( segment->GetNetCode() != testedPad->GetNetCode() )
@ -175,6 +179,9 @@ bool TRACKS_CLEANER::deleteDanglingTracks( bool aTrack, bool aVia )
for( TRACK* track : temp_tracks )
{
if( track->IsLocked() )
continue;
if( !aVia && track->Type() == PCB_VIA_T )
continue;
@ -223,6 +230,9 @@ void TRACKS_CLEANER::deleteTracksInPads()
for( TRACK* track : m_brd->Tracks() )
{
if( track->IsLocked() )
continue;
if( track->Type() == PCB_VIA_T )
continue;