ENH: Synchronize the modification of parameters to another extruder.

Change-Id: Ieac8dce3f4edec310a51d8e3af90df81a2abcbdb
Jira: none
(cherry picked from commit a1491f432ea617d799e5dd5a135b39da45aeeca9)
This commit is contained in:
chunmao.guo
2024-07-15 14:38:13 +08:00
committed by Noisyfox
parent 5458e0ea6c
commit e546a9188e
6 changed files with 42 additions and 33 deletions

View File

@@ -1243,17 +1243,11 @@ boost::any ConfigOptionsGroup::get_config_value2(const DynamicPrintConfig& confi
Field* ConfigOptionsGroup::get_fieldc(const t_config_option_key& opt_key, int opt_index)
{
Field* field = get_field(opt_key);
Field *field = get_field(opt_key);
if (field != nullptr)
return field;
std::string opt_id = "";
for (t_opt_map::iterator it = m_opt_map.begin(); it != m_opt_map.end(); ++it) {
if (opt_key == m_opt_map.at(it->first).first && opt_index == m_opt_map.at(it->first).second) {
opt_id = it->first;
break;
}
}
return opt_id.empty() ? nullptr : get_field(opt_id);
std::string opt_id = opt_key + '#' + std::to_string(opt_index);
return 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*/)