diff options
author | supermerill <merill@free.fr> | 2021-11-09 13:42:06 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2021-11-09 13:42:06 +0300 |
commit | 5b03c19bae012d6e581cbdb9477de725725ed219 (patch) | |
tree | e40b40e90a481ca7d1824709e7da6d8574b75fbc /src | |
parent | 521bd256a901cdca142929b07eb6073ced55ec9c (diff) |
fix min/max layer height loading check.
supermerill/SuperSlicer#1832
Diffstat (limited to 'src')
-rw-r--r-- | src/slic3r/GUI/Tab.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index fc789adbd..1236efa08 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3079,20 +3079,20 @@ void TabPrinter::toggle_options() const std::vector<FloatOrPercent>& min_layer_height = m_config->option<ConfigOptionFloatsOrPercents>("min_layer_height")->values; for (int i = 0; i < min_layer_height.size(); i++) { if(!min_layer_height[i].percent) - if (min_layer_height[i].get_abs_value(nozzle_diameters[i]) != 0 && (int64_t)(min_layer_height[i].get_abs_value(nozzle_diameters[i]) * 1000000.) % z_step_Mlong != 0) { + if (min_layer_height[i].value != 0 && (int64_t)(min_layer_height[i].value * 1000000.) % z_step_Mlong != 0) { if (!has_changed) new_conf = *m_config; - new_conf.option<ConfigOptionFloatsOrPercents>("min_layer_height")->values[i] = FloatOrPercent{ std::max(z_step, Slic3r::check_z_step(min_layer_height[i].get_abs_value(nozzle_diameters[i]), z_step)), false }; + new_conf.option<ConfigOptionFloatsOrPercents>("min_layer_height")->values[i].value = std::max(z_step, Slic3r::check_z_step(min_layer_height[i].value, z_step)); has_changed = true; } } std::vector<FloatOrPercent> max_layer_height = m_config->option<ConfigOptionFloatsOrPercents>("max_layer_height")->values; for (int i = 0; i < max_layer_height.size(); i++) { if (!max_layer_height[i].percent) - if ((int64_t)(max_layer_height[i].get_abs_value(nozzle_diameters[i]) * 1000000.) % z_step_Mlong != 0) { + if ((int64_t)(max_layer_height[i].value * 1000000.) % z_step_Mlong != 0) { if (!has_changed) new_conf = *m_config; - new_conf.option<ConfigOptionFloatsOrPercents>("max_layer_height")->values[i] = FloatOrPercent{ std::max(z_step, Slic3r::check_z_step(new_conf.option<ConfigOptionFloats>("max_layer_height")->values[i], z_step)), false }; + new_conf.option<ConfigOptionFloatsOrPercents>("max_layer_height")->values[i].value = std::max(z_step, Slic3r::check_z_step(max_layer_height[i].value, z_step)); has_changed = true; } } |