Merge pull request #338 from cmorty/Cooja-Make-updateGUIComponentState-public
Cooja: Make updateGUIComponentState public.
This commit is contained in:
commit
c98b55b5e0
@ -665,7 +665,7 @@ public class Cooja extends Observable {
|
|||||||
/**
|
/**
|
||||||
* Enables/disables menues and menu items depending on whether a simulation is loaded etc.
|
* Enables/disables menues and menu items depending on whether a simulation is loaded etc.
|
||||||
*/
|
*/
|
||||||
private void updateGUIComponentState() {
|
void updateGUIComponentState() {
|
||||||
if (!isVisualized()) {
|
if (!isVisualized()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2639,7 +2639,6 @@ public class Cooja extends Observable {
|
|||||||
mySimulation.addMote(newMote);
|
mySimulation.addMote(newMote);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateGUIComponentState();
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.warn("No simulation active");
|
logger.warn("No simulation active");
|
||||||
|
@ -841,6 +841,7 @@ public class Simulation extends Observable implements Runnable {
|
|||||||
|
|
||||||
setChanged();
|
setChanged();
|
||||||
notifyObservers(mote);
|
notifyObservers(mote);
|
||||||
|
cooja.updateGUIComponentState();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user