Allow multiple strong drivers with same name

Multiple labels with the same name are allowed (and expected) so ensure
that we use a structure that allows duplicate names

(cherry picked from commit de0736863b)
This commit is contained in:
Seth Hillbrand 2023-10-31 11:43:00 -07:00
parent 9ac006b114
commit 240d7921ba
1 changed files with 1 additions and 8 deletions

View File

@ -127,16 +127,9 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCheckMultipleDrivers )
return a_name < b_name;
};
auto strong_cmp = [this]( SCH_ITEM* a, SCH_ITEM* b ) -> bool
{
const wxString& a_name = GetNameForDriver( a );
const wxString& b_name = GetNameForDriver( b );
return a_name < b_name;
};
PRIORITY highest_priority = PRIORITY::INVALID;
std::set<SCH_ITEM*, decltype( candidate_cmp )> candidates( candidate_cmp );
std::set<SCH_ITEM*, decltype( strong_cmp )> strong_drivers( strong_cmp );
std::set<SCH_ITEM*> strong_drivers;
m_driver = nullptr;