mortbopet / VSRTL

Visual Simulation of Register Transfer Logic
MIT License
88 stars 18 forks source link

Port & wire does not update when Source port is out of view #21

Closed mortbopet closed 5 years ago

mortbopet commented 5 years ago

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.

mortbopet commented 5 years ago

Appears to be fixed in the above commit.