From 9b951c602b58d2df56b720ea1cb433dce3623e16 Mon Sep 17 00:00:00 2001 From: Samuel Russell Date: Mon, 5 Dec 2016 08:34:08 +0000 Subject: [PATCH] changed to update and draw modules before links to fix rendering bug --- src/com/modsim/gui/view/View.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com/modsim/gui/view/View.java b/src/com/modsim/gui/view/View.java index 663c8c0..efc66d4 100644 --- a/src/com/modsim/gui/view/View.java +++ b/src/com/modsim/gui/view/View.java @@ -127,16 +127,6 @@ public void paintStatic() { drawGrid(staticG); staticG.setTransform(oldStatic); - // Draw links - staticG.transform(wToV); - for (Link l : Main.sim.getLinks()) { - if (l == null) { - System.err.println("Warning: Null link encountered while drawing"); - continue; - } - l.draw(staticG); - } - // Draw modules - static staticG.setTransform(oldStatic); for (BaseModule m : Main.sim.getModules()) { @@ -146,6 +136,16 @@ public void paintStatic() { staticG.setTransform(oldStatic); } + // Draw links + staticG.transform(wToV); + for (Link l : Main.sim.getLinks()) { + if (l == null) { + System.err.println("Warning: Null link encountered while drawing"); + continue; + } + l.draw(staticG); + } + staticG.setTransform(oldStatic); // Static canvas is now up-to-date