Custom control : Action buttons are "alive" now

- show tooltips for buttons
- LBtnClick invokes revert functions for the field
This commit is contained in:
YuSanka 2020-10-26 19:38:09 +01:00 committed by Oleksandra Yushchenko
parent e93e80166b
commit 4f5efc99fb
7 changed files with 161 additions and 55 deletions

View file

@ -428,7 +428,7 @@ bool OptionsGroup::activate(std::function<void()> throw_if_canceled)
return true;
}
// delete all controls from the option group
void OptionsGroup::clear()
void OptionsGroup::clear(bool destroy_custom_ctrl)
{
if (!sizer)
return;
@ -460,7 +460,10 @@ void OptionsGroup::clear()
if (win)
win = nullptr;
}
custom_ctrl = nullptr;
if (destroy_custom_ctrl)
custom_ctrl->Destroy();
else
custom_ctrl = nullptr;
}
m_extra_column_item_ptrs.clear();
@ -736,6 +739,12 @@ void ConfigOptionsGroup::sys_color_changed()
field.second->sys_color_changed();
}
void ConfigOptionsGroup::refresh()
{
if (custom_ctrl)
custom_ctrl->Refresh();
}
boost::any ConfigOptionsGroup::config_value(const std::string& opt_key, int opt_index, bool deserialize) {
if (deserialize) {