To reproduce:
Place source & sink ports far away from each other, and click on the sink port. It does not repaint as being select, even though it selected.
Reason:
the source port is out of view, and thus does not get repainted, even though it gets selected by clicking the sink port - implicitely calling update() on the source port, which should trigger a repaint.
Solution should be to:
Extract m_pen setting logic from paint() method, such that pen changes can propagate between ports & wires without relying on paint() being called on intermediate ports and wires.
To reproduce: Place source & sink ports far away from each other, and click on the sink port. It does not repaint as being select, even though it selected.
Reason: the source port is out of view, and thus does not get repainted, even though it gets selected by clicking the sink port - implicitely calling update() on the source port, which should trigger a repaint.
Solution should be to: Extract m_pen setting logic from paint() method, such that pen changes can propagate between ports & wires without relying on paint() being called on intermediate ports and wires.