X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model.am2900%2Ftest%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fam2900%2FTestableAm2901Impl.java;h=2b27ae6b83a20356febc72611535e837547346a2;hb=b85bdb8de9e5a762a878dff3123a04d2458a1578;hp=1448333a6bfd261e1d97fd4db5acc7e90f913535;hpb=e1870452f32093e0f78bd63b97f316a43358dd31;p=Mograsim.git diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java index 1448333a..2b27ae6b 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java @@ -105,7 +105,7 @@ public class TestableAm2901Impl implements TestableAm2901 ViewModelModifiable viewModel = new ViewModelModifiable(); am2901 = IndirectGUIComponentCreator.createComponent(viewModel, "GUIAm2901"); // guess which pins are outputs and which are inputs - // TODO this code exists three times... but it seems too "hacky" to put it in a helper class + // TODO this code exists four times... but it seems too "hacky" to put it in a helper class List inputPinNames = new ArrayList<>(); List outputPinNames = new ArrayList<>(); for (Pin p : am2901.getPins().values()) @@ -153,7 +153,7 @@ public class TestableAm2901Impl implements TestableAm2901 if (comp instanceof SubmodelComponent) modelsToIterate.offer(((SubmodelComponent) comp).submodel); } - wiresIncludingSubmodels.forEach(w -> w.addRedrawListener(() -> + viewModel.setRedrawHandler(() -> wiresIncludingSubmodels.forEach(w -> { if (debugWires) {