Limit minimum path number to path count, not layer count

This was probably copy-pasted wrongly years ago.
The Cura interface currently doesn't allow changing the minimum path anyway, so this doesn't have any effect on the actual behaviour of Cura. Still, can't hurt to fix this, for posterity.
This commit is contained in:
Ghostkeeper 2021-03-06 14:05:17 +01:00
parent 2c55c4a562
commit 3ef01ecbd8
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -1,4 +1,4 @@
# Copyright (c) 2020 Ultimaker B.V.
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import sys
@ -258,7 +258,6 @@ class SimulationView(CuraView):
self._minimum_layer_num = self._current_layer_num
self._startUpdateTopLayers()
self.currentLayerNumChanged.emit()
def setMinimumLayer(self, value: int) -> None:
@ -272,7 +271,6 @@ class SimulationView(CuraView):
self._current_layer_num = self._minimum_layer_num
self._startUpdateTopLayers()
self.currentLayerNumChanged.emit()
def setPath(self, value: int) -> None:
@ -293,13 +291,12 @@ class SimulationView(CuraView):
self._minimum_path_num = value
if self._minimum_path_num < 0:
self._minimum_path_num = 0
if self._minimum_path_num > self._max_layers:
self._minimum_path_num = self._max_layers
if self._minimum_path_num > self._max_paths:
self._minimum_path_num = self._max_paths
if self._minimum_path_num > self._current_path_num:
self._current_path_num = self._minimum_path_num
self._startUpdateTopLayers()
self.currentPathNumChanged.emit()
def setSimulationViewType(self, layer_view_type: int) -> None: