From 3ef01ecbd873dcfa36a0d697fe2fc6d0c5fe21f8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Sat, 6 Mar 2021 14:05:17 +0100 Subject: [PATCH] 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. --- plugins/SimulationView/SimulationView.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 9494e42a5e..38e831d1ec 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -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: