mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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:
parent
9f902f7a7a
commit
b5bc4aecd5
1 changed files with 7 additions and 6 deletions
|
@ -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".
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue