From 849c4a87f9f6b8b7fe5ec442fead6fb0cebaf566 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Fri, 15 Sep 2023 15:29:55 +0200 Subject: [PATCH] Cooja: move GUI update call Put the call to update the GUI status inside the AWT thread. This ensures events are ordered in a certain way. --- java/org/contikios/cooja/Cooja.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/contikios/cooja/Cooja.java b/java/org/contikios/cooja/Cooja.java index a730338b8..e2294261e 100644 --- a/java/org/contikios/cooja/Cooja.java +++ b/java/org/contikios/cooja/Cooja.java @@ -628,7 +628,6 @@ Plugin startPlugin(final Class pluginClass, Simulation sim, Mo // Add to active plugins list var coojaPlugin = pluginType == PluginType.PType.COOJA_PLUGIN || pluginType == PluginType.PType.COOJA_STANDARD_PLUGIN; (coojaPlugin ? startedPlugins : sim.startedPlugins).add(plugin); - updateGUIComponentState(); // Show plugin if visualizer type final var pluginFrame = plugin.getCooja(); @@ -704,6 +703,7 @@ public Boolean work() { } catch (Exception e) { // Could not minimize/select. } + gui.updateGUIComponentState(); return true; } }.invokeAndWait();