mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-19 20:44:16 +02:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user