Reset color scheme limits before every recalculation

This prevents previous measurements from influencing the colour scheme. Essentially previously it was showing the colour scheme based on all lines you had ever seen, rather than just the line types you were currently seeing.
This commit is contained in:
Ghostkeeper 2021-04-03 16:56:36 +02:00
parent 9f902f7a7a
commit b5bc4aecd5
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -221,12 +221,6 @@ class SimulationView(CuraView):
def resetLayerData(self) -> None: def resetLayerData(self) -> None:
self._current_layer_mesh = None self._current_layer_mesh = None
self._current_layer_jumps = None self._current_layer_jumps = None
self._max_feedrate = sys.float_info.min
self._min_feedrate = sys.float_info.max
self._max_thickness = sys.float_info.min
self._min_thickness = sys.float_info.max
self._max_line_width = sys.float_info.min
self._min_line_width = sys.float_info.max
def beginRendering(self) -> None: def beginRendering(self) -> None:
scene = self.getController().getScene() scene = self.getController().getScene()
@ -474,6 +468,13 @@ class SimulationView(CuraView):
old_min_thickness = self._min_thickness old_min_thickness = self._min_thickness
old_max_thickness = self._max_thickness old_max_thickness = self._max_thickness
self._min_feedrate = sys.float_info.max
self._max_feedrate = sys.float_info.min
self._min_line_width = sys.float_info.max
self._max_line_width = sys.float_info.min
self._min_thickness = sys.float_info.max
self._max_thickness = sys.float_info.min
# The colour scheme is only influenced by the visible lines, so filter the lines by if they should be visible. # The colour scheme is only influenced by the visible lines, so filter the lines by if they should be visible.
visible_line_types = [] visible_line_types = []
if self.getShowSkin(): # Actually "shell". if self.getShowSkin(): # Actually "shell".