From: Daniel Kirschten Date: Wed, 29 May 2019 15:44:54 +0000 (+0200) Subject: Made pin drawing optional X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=070e36304006260c135a54093f9bae6e3d5e52a1;p=Mograsim.git Made pin drawing optional --- 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); + } } }