diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index 939ae83fbc..1f1586a7b7 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -3747,6 +3747,13 @@ int PADSTACK::Compare( PADSTACK* lhs, PADSTACK* rhs ) rhs->hash = rhs->makeHash(); int result = lhs->hash.compare( rhs->hash ); + if( result ) + return result; + + // Via names hold the drill diameters, so we have to include those to discern + // between two vias with same copper size but with different drill sizes. + result = lhs->padstack_id.compare( rhs->padstack_id ); + return result; }