Browse Source

Adds Feedback: Reset simulation, on start button, if simulation is over

Andreas T. Meyer-Berg 5 years ago
parent
commit
91ca78c77d

+ 4 - 0
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/popups/SimulationConfigurator.java

@@ -407,6 +407,10 @@ public class SimulationConfigurator extends JFrame implements Observer{
 			if(sim.isRunning()){
 				sim.stopSimulation();
 			}else{
+				if(sim.getCurrentTime()==sim.getEndTime()){
+					//Reset
+					sim.resetSimulation();
+				}
 				sim.startSimulation();
 			}
 		});