edz: group terminals by physical connector (terminalNr), drop separator lines

EPLAN 2022-style part.xml files (e.g. IFM AL1122) use a numeric
functiondefgroup attribute and do not carry the text functiondefinition
block name that the previous grouping logic relied on.  Those parts
fell back to grouping by pin designation, producing symbols with all
pin "1"s stacked together, then all "2"s, etc. — the bug reported in
PR #513.

Fix: read terminalNr first (the physical M12/connector socket identifier,
e.g. "X01", "X31") as the primary group key; fall back to functiondefinition
text for older EPLAN formats that omit terminalNr.  Pins within each
connector group are still sorted by designation using natural sort.

Also remove the dashed inter-group separator lines; the existing 5 px
gap between groups provides sufficient visual separation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Shane Ringrose
2026-06-21 02:57:14 +12:00
parent 756cfd98c0
commit 2aeeb74e72
3 changed files with 12 additions and 25 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
struct EdzPin {
QString designation; ///< terminal id, e.g. "1", "PE"
QString description; ///< function label, e.g. "L+"
QString group; ///< functiondefinition block, e.g. "FINP", "MOUT"
QString group; ///< connector group: terminalNr if present, else functiondefinition
};
/**