mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Fixed bugs with spiral_vase and standby_temperature_delta
This commit is contained in:
parent
418e083781
commit
9ebb0f27c1
2 changed files with 7 additions and 2 deletions
|
@ -234,8 +234,13 @@ void SpinCtrl::BUILD() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int min_val = m_opt_id == "standby_temperature_delta" ?
|
||||||
|
-500 : m_opt.min > 0 ?
|
||||||
|
m_opt.min : 0;
|
||||||
|
const int max_val = m_opt.max < 2147483647 ? m_opt.max : 2147483647;
|
||||||
|
|
||||||
auto temp = new wxSpinCtrl(m_parent, wxID_ANY, text_value, wxDefaultPosition, size,
|
auto temp = new wxSpinCtrl(m_parent, wxID_ANY, text_value, wxDefaultPosition, size,
|
||||||
0, m_opt.min >0 ? m_opt.min : 0, m_opt.max < 2147483647 ? m_opt.max : 2147483647, default_value);
|
0, min_val, max_val, default_value);
|
||||||
|
|
||||||
temp->Bind(wxEVT_SPINCTRL, ([this](wxCommandEvent e) { tmp_value = undef_spin_val; on_change_field(); }), temp->GetId());
|
temp->Bind(wxEVT_SPINCTRL, ([this](wxCommandEvent e) { tmp_value = undef_spin_val; on_change_field(); }), temp->GetId());
|
||||||
temp->Bind(wxEVT_KILL_FOCUS, ([this](wxEvent& e) { tmp_value = undef_spin_val; on_kill_focus(e); }), temp->GetId());
|
temp->Bind(wxEVT_KILL_FOCUS, ([this](wxEvent& e) { tmp_value = undef_spin_val; on_kill_focus(e); }), temp->GetId());
|
||||||
|
|
|
@ -255,7 +255,7 @@ void Tab::load_config(DynamicPrintConfig config)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case coPercent:
|
case coPercent:
|
||||||
value = std::to_string(int(config.option<ConfigOptionPercent>(opt_key)->value));
|
value = config.option<ConfigOptionPercent>(opt_key)->value;// std::to_string(int(config.option<ConfigOptionPercent>(opt_key)->value));
|
||||||
break;
|
break;
|
||||||
case coFloat:
|
case coFloat:
|
||||||
value = config.opt_float(opt_key);
|
value = config.opt_float(opt_key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue