Speedup by changing redraw listener system
[Mograsim.git] / net.mograsim.logic.model.am2900 / test / net / mograsim / logic / model / am2900 / TestableAm2901Impl.java
index 3d5ce86..2b27ae6 100644 (file)
@@ -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)
                        {