Skip to content

Commit

Permalink
Fix crash after re-slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Jan 24, 2024
1 parent 6bafd13 commit c944903
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/SimulationView/SimulationView.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ def setPath(self, value: float) -> None:
self._minimum_path_num = min(self._minimum_path_num, self._current_path_num)
# 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:
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.currentPathNumChanged.emit()
Expand Down

0 comments on commit c944903

Please sign in to comment.