mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 04:08:02 -06:00
Fixed strange behavior of Text- and Spin- control on KillFocus event
This commit is contained in:
parent
667ffa6101
commit
54dbc916a8
5 changed files with 27 additions and 20 deletions
|
@ -67,6 +67,11 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
|
|||
if (!this->m_disabled)
|
||||
this->on_change_OG(opt_id, value);
|
||||
};
|
||||
field->m_on_kill_focus = [this](){
|
||||
//! This function will be called from Field.
|
||||
if (!this->m_disabled)
|
||||
this->on_kill_focus();
|
||||
};
|
||||
field->m_parent = parent();
|
||||
// assign function objects for callbacks, etc.
|
||||
return field;
|
||||
|
@ -194,10 +199,6 @@ void OptionsGroup::on_change_OG(t_config_option_key id, /*config_value*/boost::a
|
|||
m_on_change(id, value);
|
||||
}
|
||||
|
||||
void OptionsGroup::_on_kill_focus (t_config_option_key id) {
|
||||
// do nothing.
|
||||
}
|
||||
|
||||
Option ConfigOptionsGroup::get_option(const std::string opt_key, int opt_index /*= -1*/)
|
||||
{
|
||||
if (!m_config->has(opt_key)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue