mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:39:00 +08:00
Fix crash after re-slicing
CURA-11438
This commit is contained in:
parent
6bafd13eaf
commit
c944903029
@ -372,7 +372,10 @@ class SimulationView(CuraView):
|
|||||||
self._minimum_path_num = min(self._minimum_path_num, self._current_path_num)
|
self._minimum_path_num = min(self._minimum_path_num, self._current_path_num)
|
||||||
# update _current time when the path is changed by user
|
# update _current time when the path is changed by user
|
||||||
if self._current_path_num < self._max_paths and round(self._current_path_num)== self._current_path_num:
|
if self._current_path_num < self._max_paths and round(self._current_path_num)== self._current_path_num:
|
||||||
self._current_time = self.cumulativeLineDuration()[int(self._current_path_num)]
|
actual_path_num = int(self._current_path_num)
|
||||||
|
cumulative_line_duration = self.cumulativeLineDuration()
|
||||||
|
if actual_path_num < len(cumulative_line_duration):
|
||||||
|
self._current_time = cumulative_line_duration[actual_path_num]
|
||||||
|
|
||||||
self._startUpdateTopLayers()
|
self._startUpdateTopLayers()
|
||||||
self.currentPathNumChanged.emit()
|
self.currentPathNumChanged.emit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user