Skip to content

Commit

Permalink
Move call to updateGUIComponentState from doAddMotes to addMote
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorty committed Nov 20, 2013
1 parent 2e257ef commit 3359a86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tools/cooja/java/org/contikios/cooja/Cooja.java
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public void actionPerformed(ActionEvent e) {
/**
* Enables/disables menues and menu items depending on whether a simulation is loaded etc.
*/
private void updateGUIComponentState() {
void updateGUIComponentState() {
if (!isVisualized()) {
return;
}
Expand Down Expand Up @@ -2639,7 +2639,6 @@ public void doAddMotes(MoteType moteType) {
mySimulation.addMote(newMote);
}
}
updateGUIComponentState();

} else {
logger.warn("No simulation active");
Expand Down
1 change: 1 addition & 0 deletions tools/cooja/java/org/contikios/cooja/Simulation.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ public void run() {

setChanged();
notifyObservers(mote);
cooja.updateGUIComponentState();
}
};

Expand Down

0 comments on commit 3359a86

Please sign in to comment.