mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix max layer to correspond to starting layer
When the starting layer was set to 0 the max layer was not adjusted to be max_layer-1. This commit makes the extra adjustment.
This commit is contained in:
parent
e128dadbf5
commit
a720939e64
1 changed files with 2 additions and 0 deletions
|
@ -79,6 +79,8 @@ class DisplayFilenameAndLayerOnLCD(Script):
|
||||||
if line.startswith(";LAYER_COUNT:"):
|
if line.startswith(";LAYER_COUNT:"):
|
||||||
max_layer = line
|
max_layer = line
|
||||||
max_layer = max_layer.split(":")[1]
|
max_layer = max_layer.split(":")[1]
|
||||||
|
if self.getSettingValueByKey("startNum") == 0:
|
||||||
|
max_layer = str(int(max_layer) - 1)
|
||||||
if line.startswith(";LAYER:"):
|
if line.startswith(";LAYER:"):
|
||||||
if self.getSettingValueByKey("maxlayer"):
|
if self.getSettingValueByKey("maxlayer"):
|
||||||
display_text = display_text + " of " + max_layer
|
display_text = display_text + " of " + max_layer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue