make sure components are initialized at tick event

This commit is contained in:
fros4943 2009-03-26 15:41:59 +00:00
parent 1cc78b180f
commit bc26f42992

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SimControl.java,v 1.11 2009/03/09 15:39:33 fros4943 Exp $
* $Id: SimControl.java,v 1.12 2009/03/26 15:41:59 fros4943 Exp $
*/
package se.sics.cooja.plugins;
@ -122,8 +122,10 @@ public class SimControl extends VisPlugin {
}
}
sliderDelay.setValue(convertTimeToSlide(simulation.getDelayTime()));
simulationTime.setText("Current simulation time: " + simulation.getSimulationTime());
if (sliderDelay != null) {
sliderDelay.setValue(convertTimeToSlide(simulation.getDelayTime()));
simulationTime.setText("Current simulation time: " + simulation.getSimulationTime());
}
}
});
}