From 73ea0fc15e2543d42120f439d237743f40681693 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 11 Feb 2021 17:25:02 -0500 Subject: [PATCH] Always upgrade to a stronger driver even if the path is longer Fixes https://gitlab.com/kicad/code/kicad/-/issues/7492 --- eeschema/connection_graph.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 4f4186d157..1b05f47e32 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1846,12 +1846,14 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph ) // Pick a better driving subgraph if it: // a) has a power pin or global driver // b) is a strong driver and we're a weak driver - // c) meets or exceeds our priority, is a strong driver, and has a shorter path - // d) matches our strength and is at least as short, and is alphabetically lower + // c) is a higher priority strong driver + // d) matches our priority, is a strong driver, and has a shorter path + // e) matches our strength and is at least as short, and is alphabetically lower if( ( priority >= CONNECTION_SUBGRAPH::PRIORITY::POWER_PIN ) || ( !originalStrong && candidateStrong ) || - ( priority >= highest && candidateStrong && shorterPath ) || + ( priority > highest && candidateStrong ) || + ( priority == highest && candidateStrong && shorterPath ) || ( ( originalStrong == candidateStrong ) && asGoodPath && ( candidateName < originalName ) ) ) {