mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-30 14:54:13 +02:00
bd4d942d71
Discussion #1157. IEC 61666 §4.1 requires each terminal to be identified unambiguously within its object, so two terminals of one element must not share a name. On save, the element editor now: - refuses to save when two terminals share a name, lists the names ("N ×3") and selects those terminals; - warns, and still saves, when a terminal has no name. Folio reports, conductor definitions and thumbnails are skipped. Names are compared after trimming surrounding spaces, case sensitive. Settings > General > Editor has a new checkbox, on by default, that turns both checks off (elementeditor/check-terminal-names). --check-elements applies the same rule: repeated names are a FAIL, missing names a WARN. It ignores the setting, since it is an explicit check. On the shipped collection this reports 82 FAILs, the elements that repeat a terminal name today. The rule lives in the header-only editor/terminalnamecheck.h, shared by both, and is unit tested by tst_terminalnamecheck. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>