mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Custom control : Implemented blinking icon
This commit is contained in:
parent
4f5efc99fb
commit
1c22d788aa
7 changed files with 98 additions and 29 deletions
|
@ -923,6 +923,21 @@ Field* ConfigOptionsGroup::get_fieldc(const t_config_option_key& opt_key, int op
|
|||
return opt_id.empty() ? nullptr : get_field(opt_id);
|
||||
}
|
||||
|
||||
std::pair<OG_CustomCtrl*, bool*> ConfigOptionsGroup::get_custom_ctrl_with_blinking_ptr(const t_config_option_key& opt_key, int opt_index/* = -1*/)
|
||||
{
|
||||
Field* field = get_fieldc(opt_key, opt_index);
|
||||
|
||||
if (field)
|
||||
return {custom_ctrl, field->get_blink_ptr()};
|
||||
|
||||
for (Line& line : m_lines)
|
||||
for (const Option& opt : line.get_options())
|
||||
if (opt.opt_id == opt_key && line.widget)
|
||||
return { custom_ctrl, line.get_blink_ptr() };
|
||||
|
||||
return { nullptr, nullptr };
|
||||
}
|
||||
|
||||
// Change an option on m_config, possibly call ModelConfig::touch().
|
||||
void ConfigOptionsGroup::change_opt_value(const t_config_option_key& opt_key, const boost::any& value, int opt_index /*= 0*/)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue