Fixed strange behavior of Text- and Spin- control on KillFocus event

This commit is contained in:
YuSanka 2018-01-31 14:59:44 +01:00
parent 667ffa6101
commit 54dbc916a8
5 changed files with 27 additions and 20 deletions

View file

@ -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)) {