From de0736863baa46b754347e440eb9d99f92ed09c0 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 31 Oct 2023 11:43:00 -0700 Subject: [PATCH] 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 --- eeschema/connection_graph.cpp | 9 +- .../netlists/issue16003/issue16003_test.net | 105 ------------------ 2 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 qa/data/eeschema/netlists/issue16003/issue16003_test.net diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 1cd63d2a16..7d03c5addf 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -129,16 +129,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 candidates( candidate_cmp ); - std::set strong_drivers( strong_cmp ); + std::set strong_drivers; m_driver = nullptr; diff --git a/qa/data/eeschema/netlists/issue16003/issue16003_test.net b/qa/data/eeschema/netlists/issue16003/issue16003_test.net deleted file mode 100644 index 882c5dc045..0000000000 --- a/qa/data/eeschema/netlists/issue16003/issue16003_test.net +++ /dev/null @@ -1,105 +0,0 @@ -(export (version "E") - (design - (source "/Users/jon.evans/src/kicad-arm64/qa/data/eeschema/netlists/issue16003/issue16003.kicad_sch") - (date "2023-10-31T12:56:00-0400") - (tool "Eeschema 7.99.0-3461-gb5d904b45d-dirty") - (sheet (number "1") (name "/") (tstamps "/") - (title_block - (title) - (company) - (rev) - (date) - (source "issue16003.kicad_sch") - (comment (number "1") (value "")) - (comment (number "2") (value "")) - (comment (number "3") (value "")) - (comment (number "4") (value "")) - (comment (number "5") (value "")) - (comment (number "6") (value "")) - (comment (number "7") (value "")) - (comment (number "8") (value "")) - (comment (number "9") (value "")))) - (sheet (number "2") (name "/asdf/") (tstamps "/ce23ea76-7ff9-468b-89b3-236e2b89d068/") - (title_block - (title) - (company) - (rev) - (date) - (source "untitled.kicad_sch") - (comment (number "1") (value "")) - (comment (number "2") (value "")) - (comment (number "3") (value "")) - (comment (number "4") (value "")) - (comment (number "5") (value "")) - (comment (number "6") (value "")) - (comment (number "7") (value "")) - (comment (number "8") (value "")) - (comment (number "9") (value "")))) - (sheet (number "3") (name "/Untitled Sheet/") (tstamps "/d85d11bb-751a-4c5d-8162-7fc237e76b69/") - (title_block - (title) - (company) - (rev) - (date) - (source "untitled2.kicad_sch") - (comment (number "1") (value "")) - (comment (number "2") (value "")) - (comment (number "3") (value "")) - (comment (number "4") (value "")) - (comment (number "5") (value "")) - (comment (number "6") (value "")) - (comment (number "7") (value "")) - (comment (number "8") (value "")) - (comment (number "9") (value ""))))) - (components - (comp (ref "R1") - (value "R") - (fields - (field (name "Footprint")) - (field (name "Datasheet")) - (field (name "Description"))) - (libsource (lib "Device") (part "R") (description "Resistor")) - (property (name "Sheetname") (value "asdf")) - (property (name "Sheetfile") (value "untitled.kicad_sch")) - (property (name "Field2") (value "")) - (property (name "ki_keywords") (value "R res resistor")) - (property (name "ki_fp_filters") (value "R_*")) - (sheetpath (names "/asdf/") (tstamps "/ce23ea76-7ff9-468b-89b3-236e2b89d068/")) - (tstamps "f3a13820-ca5a-4b6d-979c-c54ca93fbc20")) - (comp (ref "R2") - (value "R") - (fields - (field (name "Footprint")) - (field (name "Datasheet")) - (field (name "Description"))) - (libsource (lib "Device") (part "R") (description "Resistor")) - (property (name "Sheetname") (value "Untitled Sheet")) - (property (name "Sheetfile") (value "untitled2.kicad_sch")) - (property (name "ki_keywords") (value "R res resistor")) - (property (name "ki_fp_filters") (value "R_*")) - (sheetpath (names "/Untitled Sheet/") (tstamps "/d85d11bb-751a-4c5d-8162-7fc237e76b69/")) - (tstamps "b558b517-2fa0-4aca-bb82-bdb2b8ee6894"))) - (libparts - (libpart (lib "Device") (part "R") - (description "Resistor") - (docs "~") - (footprints - (fp "R_*")) - (fields - (field (name "Reference") "R") - (field (name "Value") "R") - (field (name "Footprint")) - (field (name "Datasheet") "~") - (field (name "Description") "Resistor")) - (pins - (pin (num "1") (name "") (type "passive")) - (pin (num "2") (name "") (type "passive"))))) - (libraries) - (nets - (net (code "1") (name "/Untitled Sheet/bbb") - (node (ref "R2") (pin "2") (pintype "passive"))) - (net (code "2") (name "/asdf/bbb") - (node (ref "R1") (pin "2") (pintype "passive"))) - (net (code "3") (name "aaa") - (node (ref "R1") (pin "1") (pintype "passive")) - (node (ref "R2") (pin "1") (pintype "passive"))))) \ No newline at end of file