mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Update plugins/SimulationView/SimulationViewProxy.py
simplified code Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
This commit is contained in:
parent
75ff829b5f
commit
a19c667106
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user