mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 08:17:51 -06:00
revert changes for min_layer_height check, there was legacy config on user's machine that won't pass this check. (why?)
This commit is contained in:
parent
49982a4497
commit
1eb54c49a6
1 changed files with 4 additions and 5 deletions
|
@ -174,15 +174,14 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||||
|
|
||||||
// layer_height shouldn't be equal to zero
|
// layer_height shouldn't be equal to zero
|
||||||
auto gpreset = GUI::wxGetApp().preset_bundle->printers.get_edited_preset();
|
auto gpreset = GUI::wxGetApp().preset_bundle->printers.get_edited_preset();
|
||||||
auto min_lh = gpreset.config.opt_float("min_layer_height",0);
|
if (config->opt_float("layer_height") < EPSILON)
|
||||||
if (min_lh > 0 && config->opt_float("layer_height") < min_lh)
|
|
||||||
{
|
{
|
||||||
wxString msg_text = wxString::Format(L"Too small layer height.\nReset to %0.3f", min_lh);
|
const wxString msg_text = _(L("Too small layer height.\nReset to 0.2"));
|
||||||
MessageDialog dialog(m_msg_dlg_parent, msg_text,"", wxICON_WARNING | wxOK);
|
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||||
DynamicPrintConfig new_conf = *config;
|
DynamicPrintConfig new_conf = *config;
|
||||||
is_msg_dlg_already_exist = true;
|
is_msg_dlg_already_exist = true;
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
new_conf.set_key_value("layer_height", new ConfigOptionFloat(min_lh));
|
new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.2));
|
||||||
apply(config, &new_conf);
|
apply(config, &new_conf);
|
||||||
is_msg_dlg_already_exist = false;
|
is_msg_dlg_already_exist = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue