From a19c667106fce8ab4e6f7c7f50bd16c709d2aa51 Mon Sep 17 00:00:00 2001 From: Saumya Jain <70144862+saumyaj3@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:29:33 +0100 Subject: [PATCH] Update plugins/SimulationView/SimulationViewProxy.py simplified code Co-authored-by: Casper Lamboo --- plugins/SimulationView/SimulationViewProxy.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index 8f83e9b403..e3d5ca13a7 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -64,9 +64,7 @@ class SimulationViewProxy(QObject): # We multiply the time with 100 to make it to ms from s.(Should be 1000 in real time). This scaling makes the simulation time 10x faster than the real time. simulationTimeOfpath =self._simulation_view.getSimulationTime()[0][self._simulation_view.getCurrentPath()] * 100 # Since the timer cannot process time less than 1 ms, we put a lower limit here - if simulationTimeOfpath < 1: - return 1 - return int(simulationTimeOfpath) + return int(max(1, simulationTimeOfpath)) @pyqtProperty(int, notify=currentPathChanged) def minimumPath(self):