mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-04 18:04:14 +02:00
Merge pull request #1272 from ispyisail/feature/wires-per-terminal
Add an optional limit on wires per terminal (discussion #1158)
This commit is contained in:
@@ -973,6 +973,11 @@ bool QetScriptApi::addConductor(int folioIndex,
|
||||
log(QStringLiteral("qet.addConductor: those two terminals are already wired together"));
|
||||
return false;
|
||||
}
|
||||
if (!t1->hasRoomForWire() || !t2->hasRoomForWire()) {
|
||||
log(QStringLiteral("qet.addConductor: a terminal already has as many wires as the "
|
||||
"project's wires-per-terminal limit allows"));
|
||||
return false;
|
||||
}
|
||||
if (!t1->canBeLinkedTo(t2)) {
|
||||
log(QStringLiteral("qet.addConductor: those two terminals cannot be linked"));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user