From a8463288aadcba38e5e9b2a446f2304d3eb79975 Mon Sep 17 00:00:00 2001 From: DaTweety <129504390+DaTweety@users.noreply.github.com> Date: Sat, 17 Oct 2026 21:29:06 +0200 Subject: [PATCH] Continuity check: conductors in different cables are no divergence checkContinuity() reported potential_mismatch on "cable" whenever the conductors of one potential ran in different cables. A conductor held by a cable carries its own core's label in the cable field (15W1:BN, written by CableManager); a potential spread over several cables is the normal case, e.g. a neutral fed from a terminal strip into each room. On a house installation every N and PE potential was flagged. Conductors held by a cable are left out of the cable comparison; the free-text cable field of other conductors is still compared. Co-Authored-By: Claude Opus 5.5 --- sources/scripting/qetscriptapi.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sources/scripting/qetscriptapi.cpp b/sources/scripting/qetscriptapi.cpp index e40151823..cec665675 100644 --- a/sources/scripting/qetscriptapi.cpp +++ b/sources/scripting/qetscriptapi.cpp @@ -5379,6 +5379,15 @@ QVariantList QetScriptApi::checkContinuity(int folioIndex) QHash> distinct_values; for (Conductor *pc : std::as_const(potential)) { for (const QString &prop : checked_properties) { + //A conductor held by a cable carries its core's label + //(15W1:BN) in the cable field, written by CableManager: + //one conductor, one core. Two conductors of a potential + //running in two cables are the normal case, not a + //divergence. + if (prop == QLatin1String("cable") + && !pc->properties().m_cable_uuid.isNull()) { + continue; + } distinct_values[prop].insert(conductorPropertyValue(pc->properties(), prop)); } }