mirror of
https://github.com/hneemann/Digital.git
synced 2025-08-04 02:08:00 -04:00
fixes an issue with tooltips in generic circuits, closes #599
This commit is contained in:
parent
292b2ec718
commit
132d5c46e1
@ -570,8 +570,12 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
removeHighLighted();
|
||||
}
|
||||
|
||||
Circuit circuit = shallowCopy;
|
||||
if (circuit == null)
|
||||
circuit = getCircuit();
|
||||
|
||||
Vector pos = getPosVector(event);
|
||||
VisualElement ve = getCircuit().getElementAt(pos);
|
||||
VisualElement ve = circuit.getElementAt(pos);
|
||||
if (ve != null) {
|
||||
Pin p = ve.getPinAt(raster(pos));
|
||||
if (p != null)
|
||||
@ -592,7 +596,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
}
|
||||
}
|
||||
|
||||
Wire w = getCircuit().getWireAt(pos, (int) (SIZE2 / transform.getScaleX()));
|
||||
Wire w = circuit.getWireAt(pos, (int) (SIZE2 / transform.getScaleX()));
|
||||
if (w != null) {
|
||||
ObservableValue v = w.getValue();
|
||||
if (v != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user