Pcbnew: fix delete dangling tracks only removes the last segment of tracks.

Fixes: lp:1816234
https://bugs.launchpad.net/kicad/+bug/1816234
This commit is contained in:
jean-pierre charras 2019-02-16 16:05:29 +01:00
parent ec59361f75
commit 303b7ac7f8
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

View File

@ -237,8 +237,6 @@ bool TRACKS_CLEANER::CleanupBoard( bool aRemoveMisConnected,
// Delete dangling tracks // Delete dangling tracks
if( aDeleteUnconnected ) if( aDeleteUnconnected )
{ {
buildTrackConnectionInfo();
if( deleteDanglingTracks() ) if( deleteDanglingTracks() )
{ {
modified = true; modified = true;
@ -391,6 +389,7 @@ bool TRACKS_CLEANER::deleteDanglingTracks()
do // Iterate when at least one track is deleted do // Iterate when at least one track is deleted
{ {
buildTrackConnectionInfo();
item_erased = false; item_erased = false;
TRACK* next_track; TRACK* next_track;