mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 04:54:13 +02:00
ffd829bb69
max_slaves records how many contacts a part is expected to carry. It was enforced as a rule the drawing had to obey, which obstructs the way both @scorpio810 and @IBSYSLevi described working in #819: draw the schematic first, choose the physical hardware afterwards. A limit that refuses the link forces the hardware decision up front, which is exactly what they said gets in the way. Two changes, both in the UI rather than in isFull(), which stays the query it always was: - MasterPropertiesWidget::on_link_button_clicked() now says the limit is reached and asks whether to link anyway, defaulting to yes, instead of refusing outright. - LinkSingleElementWidget no longer removes a full master from the candidate list. That was the worse half: a master at its limit simply was not there, indistinguishable from one that does not exist, with nothing to say why. It now stays selectable and the user decides. PLC masters are deliberately left alone. Their limit is the number of declared IO slots, which is structural rather than advisory -- a link past it would have no IO index to map to -- and PlcLinkWidget already tells the user when it hides one, via m_hidden_masters_label. Only coils that opt into a limit are affected: max_slaves defaults to -1, and no project in examples/ sets it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>