X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fcomponents%2FGUIManualSwitch.java;fp=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fcomponents%2FGUIManualSwitch.java;h=fde7bbdea1b4e8e8ec9cd5bd77eb23a3037ea07d;hb=0ce7f7122a702c3d6a4b864172b8c93620c8b03b;hp=7dcb025f792a790dca577becdc7ef7a0ea67766d;hpb=6ab8014cf6bb882187ab4d22fdf460dc0adbc2ab;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/components/GUIManualSwitch.java b/LogicUI/src/era/mi/gui/components/GUIManualSwitch.java index 7dcb025f..fde7bbde 100644 --- a/LogicUI/src/era/mi/gui/components/GUIManualSwitch.java +++ b/LogicUI/src/era/mi/gui/components/GUIManualSwitch.java @@ -72,7 +72,7 @@ public class GUIManualSwitch extends ManualSwitch implements BasicGUIComponent @Override public boolean clicked(double x, double y) { - toggle(); + timeline.addEvent((e) -> toggle(), (int) (System.currentTimeMillis() - timeline.getSimulationTime())); return true; }