Ignore lastDriver in connectivity
Using the last driver in driver sorting breaks the stability/reproducibility
of the netlisting algorithm. The last driver still needs to be tracked for
efficient redraw dirty detection.
Partially reverts 81e1bc9
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10757
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11393
This commit is contained in:
parent
4cdf0bd6c9
commit
014d536954
|
@ -130,21 +130,6 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCheckMultipleDrivers )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// See if a previous driver is still a candidate
|
|
||||||
void* previousDriver = nullptr;
|
|
||||||
|
|
||||||
for( SCH_ITEM* member : m_items )
|
|
||||||
{
|
|
||||||
if( SCH_CONNECTION* mc = member->Connection( &m_sheet ) )
|
|
||||||
{
|
|
||||||
if( mc->GetLastDriver() )
|
|
||||||
{
|
|
||||||
previousDriver = mc->GetLastDriver();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For all other driver types, sort by quality of name
|
// For all other driver types, sort by quality of name
|
||||||
std::sort( candidates.begin(), candidates.end(),
|
std::sort( candidates.begin(), candidates.end(),
|
||||||
[&]( SCH_ITEM* a, SCH_ITEM* b ) -> bool
|
[&]( SCH_ITEM* a, SCH_ITEM* b ) -> bool
|
||||||
|
@ -160,12 +145,6 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCheckMultipleDrivers )
|
||||||
if( ac->IsBus() && bc->IsBus() )
|
if( ac->IsBus() && bc->IsBus() )
|
||||||
return bc->IsSubsetOf( ac );
|
return bc->IsSubsetOf( ac );
|
||||||
|
|
||||||
if( a == previousDriver )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if( b == previousDriver )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
wxString a_name = GetNameForDriver( a );
|
wxString a_name = GetNameForDriver( a );
|
||||||
wxString b_name = GetNameForDriver( b );
|
wxString b_name = GetNameForDriver( b );
|
||||||
bool a_lowQualityName = a_name.Contains( "-Pad" );
|
bool a_lowQualityName = a_name.Contains( "-Pad" );
|
||||||
|
|
Loading…
Reference in New Issue