From 3359a86d2920e1f0bf5104ebfb921fba99ac4813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=27Morty=27=20Str=C3=BCbe?= Date: Tue, 19 Nov 2013 16:45:12 +0100 Subject: [PATCH] Move call to updateGUIComponentState from doAddMotes to addMote --- tools/cooja/java/org/contikios/cooja/Cooja.java | 3 +-- tools/cooja/java/org/contikios/cooja/Simulation.java | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cooja/java/org/contikios/cooja/Cooja.java b/tools/cooja/java/org/contikios/cooja/Cooja.java index b8c7d57dc..997d705dd 100644 --- a/tools/cooja/java/org/contikios/cooja/Cooja.java +++ b/tools/cooja/java/org/contikios/cooja/Cooja.java @@ -665,7 +665,7 @@ public class Cooja extends Observable { /** * Enables/disables menues and menu items depending on whether a simulation is loaded etc. */ - private void updateGUIComponentState() { + void updateGUIComponentState() { if (!isVisualized()) { return; } @@ -2639,7 +2639,6 @@ public class Cooja extends Observable { mySimulation.addMote(newMote); } } - updateGUIComponentState(); } else { logger.warn("No simulation active"); diff --git a/tools/cooja/java/org/contikios/cooja/Simulation.java b/tools/cooja/java/org/contikios/cooja/Simulation.java index 0f9943628..6cf7777fe 100644 --- a/tools/cooja/java/org/contikios/cooja/Simulation.java +++ b/tools/cooja/java/org/contikios/cooja/Simulation.java @@ -841,6 +841,7 @@ public class Simulation extends Observable implements Runnable { setChanged(); notifyObservers(mote); + cooja.updateGUIComponentState(); } };