X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=SampleERCP%2Fsrc%2Fsampleercp%2Fparts%2FLogicUIPart.java;h=ee1d7759227016b4074fcfc710e4e3646ea86c68;hb=0ce7f7122a702c3d6a4b864172b8c93620c8b03b;hp=481879c6a209ee9d02721bb5271ca295fddb9a05;hpb=6c67a9ff8361cd9fc082f40e2676f2c8b5911fe4;p=Mograsim.git diff --git a/SampleERCP/src/sampleercp/parts/LogicUIPart.java b/SampleERCP/src/sampleercp/parts/LogicUIPart.java index 481879c6..ee1d7759 100644 --- a/SampleERCP/src/sampleercp/parts/LogicUIPart.java +++ b/SampleERCP/src/sampleercp/parts/LogicUIPart.java @@ -22,7 +22,7 @@ public class LogicUIPart { Timeline timeline = new Timeline(11); LogicUICanvas ui = new LogicUICanvas(parent, SWT.NONE); - RSLatchGUIExample.addComponentsAndWires(ui); + RSLatchGUIExample.addComponentsAndWires(ui, timeline); ui.addTransformListener((x, y, z) -> part.setDirty(z < 1)); ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(ui); userInput.buttonDrag = 3; @@ -34,7 +34,7 @@ public class LogicUIPart while (!ui.isDisposed()) { // always execute to keep timeline from "hanging behind" for too long - timeline.executeUpTo(System.currentTimeMillis(), System.currentTimeMillis() + 10); + timeline.executeUntil(timeline.laterThan(System.currentTimeMillis()), System.currentTimeMillis() + 10); long sleepTime; if (timeline.hasNext()) sleepTime = timeline.nextEventTime() - System.currentTimeMillis();