mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH:add total layer/current layer UI
Change-Id: Ib0ceae161280258d9a9fbf6fb46d34810f24c57a Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
67d4e2148f
commit
8ab190da48
4 changed files with 36 additions and 1 deletions
|
@ -2368,6 +2368,19 @@ int MachineObject::parse_json(std::string payload)
|
|||
if (jj.contains("subtask_name")) {
|
||||
subtask_name = jj["subtask_name"].get<std::string>();
|
||||
}
|
||||
if (jj.contains("layer_num")) {
|
||||
curr_layer = jj["layer_num"].get<int>();
|
||||
}
|
||||
if (jj.contains("total_layer_num")) {
|
||||
total_layers = jj["total_layer_num"].get<int>();
|
||||
if (total_layers == 0)
|
||||
is_support_layer_num = false;
|
||||
else
|
||||
is_support_layer_num = true;
|
||||
} else {
|
||||
is_support_layer_num = false;
|
||||
}
|
||||
|
||||
if (jj.contains("gcode_state")) {
|
||||
this->set_print_state(jj["gcode_state"].get<std::string>());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue