X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2FLogicUICanvas.java;h=6610e2e3d30cccde648ee22be5ef5111a15ecddd;hb=d27165bc7b5dcff6c1e3d7f88f7195c5418ab9df;hp=da724d838c7d4d6a7808d1d9cb3ac597d1479d59;hpb=533a3fe1578af4ac450ee677c6873e4579d1cfc3;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/LogicUICanvas.java b/LogicUI/src/era/mi/gui/LogicUICanvas.java index da724d83..6610e2e3 100644 --- a/LogicUI/src/era/mi/gui/LogicUICanvas.java +++ b/LogicUI/src/era/mi/gui/LogicUICanvas.java @@ -22,6 +22,8 @@ import net.haspamelodica.swt.helper.zoomablecanvas.ZoomableCanvas; */ public class LogicUICanvas extends ZoomableCanvas { + private static final boolean DRAW_PINS = false; + private final ViewModel model; public LogicUICanvas(Composite parent, int style, ViewModel model) @@ -84,11 +86,14 @@ public class LogicUICanvas extends ZoomableCanvas private void drawComponent(GeneralGC gc, GUIComponent component, Rectangle visibleRegion) { component.render(gc, visibleRegion); - gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_DARK_CYAN)); - for (Pin p : component.getPins()) + if (DRAW_PINS) { - Point pos = p.getPos(); - gc.fillOval(pos.x - 1, pos.y - 1, 2, 2); + gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_DARK_CYAN)); + for (Pin p : component.getPins()) + { + Point pos = p.getPos(); + gc.fillOval(pos.x - 1, pos.y - 1, 2, 2); + } } }