+ new POT
This commit is contained in:
YuSanka 2019-05-20 16:05:15 +02:00
parent 9dc6699229
commit 7b84d1e710
2 changed files with 1434 additions and 1346 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1235,16 +1235,47 @@ void TabPrint::update()
return; // ys_FIXME
// #ys_FIXME_to_delete
//! Temporary workaround for the correct updates of the SpinCtrl (like "perimeters"):
//! Temporary workaround for the correct updates of the TextCtrl (like "layer_height"):
// KillFocus() for the wxSpinCtrl use CallAfter function. So,
// to except the duplicate call of the update() after dialog->ShowModal(),
// let check if this process is already started.
// if (is_msg_dlg_already_exist) // ! It looks like a fixed problem after start to using of a m_dirty_options
// return; // ! TODO Let delete this part of code after a common aplication testing
if (is_msg_dlg_already_exist)
return;
m_update_cnt++;
// Freeze();
// layer_height shouldn't be equal to zero
if (m_config->opt_float("layer_height") < EPSILON)
{
const wxString msg_text = _(L("Layer height can't be equal to zero.\n"
"\nShall I set its value to minimum (0.01)?"));
auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Layer height")), wxICON_WARNING | wxYES | wxNO);
DynamicPrintConfig new_conf = *m_config;
is_msg_dlg_already_exist = true;
if (dialog->ShowModal() == wxID_YES)
new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.01));
else {}
load_config(new_conf);
is_msg_dlg_already_exist = false;
}
if (fabs(m_config->option<ConfigOptionFloatOrPercent>("first_layer_height")->value - 0) < EPSILON)
{
const wxString msg_text = _(L("First layer height can't be equal to zero.\n"
"\nShall I set its value to minimum (0.01)?"));
auto dialog = new wxMessageDialog(parent(), msg_text, _(L("First layer height")), wxICON_WARNING | wxYES | wxNO);
DynamicPrintConfig new_conf = *m_config;
is_msg_dlg_already_exist = true;
if (dialog->ShowModal() == wxID_YES)
new_conf.set_key_value("first_layer_height", new ConfigOptionFloatOrPercent(0.01, false));
else {}
load_config(new_conf);
is_msg_dlg_already_exist = false;
}
double fill_density = m_config->option<ConfigOptionPercent>("fill_density")->value;
if (m_config->opt_bool("spiral_vase") &&
@ -1258,7 +1289,6 @@ void TabPrint::update()
"- no ensure_vertical_shell_thickness\n"
"\nShall I adjust those settings in order to enable Spiral Vase?"));
auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Spiral Vase")), wxICON_WARNING | wxYES | wxNO);
// is_msg_dlg_already_exist = true;
DynamicPrintConfig new_conf = *m_config;
if (dialog->ShowModal() == wxID_YES) {
new_conf.set_key_value("perimeters", new ConfigOptionInt(1));
@ -1274,7 +1304,6 @@ void TabPrint::update()
}
load_config(new_conf);
on_value_change("fill_density", fill_density);
// is_msg_dlg_already_exist = false;
}
if (m_config->opt_bool("wipe_tower") && m_config->opt_bool("support_material") &&