mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08: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
@ -79,6 +79,8 @@ class DisplayFilenameAndLayerOnLCD(Script):
|
||||
if line.startswith(";LAYER_COUNT:"):
|
||||
max_layer = line
|
||||
max_layer = max_layer.split(":")[1]
|
||||
if self.getSettingValueByKey("startNum") == 0:
|
||||
max_layer = str(int(max_layer) - 1)
|
||||
if line.startswith(";LAYER:"):
|
||||
if self.getSettingValueByKey("maxlayer"):
|
||||
display_text = display_text + " of " + max_layer
|
||||
|
Loading…
x
Reference in New Issue
Block a user