X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2FLogicUIRenderer.java;h=56ecffb76c6a4473471d90b8c6ede23da82d33b1;hb=5ece0acf049bf9af2933f513fe0206565681f622;hp=29bf613608b97a4f078e41333acd4bbc506f25f3;hpb=42a4b251c7b16ed0873fcb1450a12fab98b08fd4;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/LogicUIRenderer.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/LogicUIRenderer.java index 29bf6136..56ecffb7 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/LogicUIRenderer.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/LogicUIRenderer.java @@ -32,7 +32,7 @@ public class LogicUIRenderer if (visibleRegion.intersects(bounds.x - lw, bounds.y - lw, bounds.width + lw + lw, bounds.height + lw + lw)) w.render(gc); }); - model.getComponents().forEach(c -> renderComponent(gc, c, visibleRegion)); + model.getComponentsByName().values().forEach(c -> renderComponent(gc, c, visibleRegion)); } private static void renderComponent(GeneralGC gc, GUIComponent component, Rectangle visibleRegion) @@ -45,7 +45,7 @@ public class LogicUIRenderer if (DRAW_PINS) { gc.setBackground(gc.getDevice().getSystemColor(SWT.COLOR_DARK_CYAN)); - for (Pin p : component.getPins()) + for (Pin p : component.getPins().values()) { Point pos = p.getPos(); gc.fillOval(pos.x - 1, pos.y - 1, 2, 2);