Move call to updateGUIComponentState from doAddMotes to addMote

This commit is contained in:
Moritz 'Morty' Strübe 2013-11-19 16:45:12 +01:00
parent 2e257eff9b
commit 3359a86d29
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -841,6 +841,7 @@ public class Simulation extends Observable implements Runnable {
setChanged();
notifyObservers(mote);
cooja.updateGUIComponentState();
}
};