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 <noreply@anthropic.com>
This commit is contained in:
DaTweety
2026-10-17 21:29:06 +02:00
parent 8c5a16d50e
commit a8463288aa
+9
View File
@@ -5379,6 +5379,15 @@ QVariantList QetScriptApi::checkContinuity(int folioIndex)
QHash<QString, QSet<QString>> 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));
}
}