Update additional object setting after print technology changing

This commit is contained in:
YuSanka 2018-11-29 15:00:23 +01:00
parent 38733ff56a
commit d7f9e86400
4 changed files with 27 additions and 0 deletions

View file

@ -721,6 +721,14 @@ wxMenu* ObjectList::create_settings_popupmenu(bool is_part)
return menu;
}
void ObjectList::update_opt_keys(t_config_option_keys& opt_keys)
{
auto full_current_opts = get_options(false);
for (int i = opt_keys.size()-1; i >= 0; --i)
if (find(full_current_opts.begin(), full_current_opts.end(), opt_keys[i]) == full_current_opts.end())
opt_keys.erase(opt_keys.begin() + i);
}
void ObjectList::load_subobject(int type)
{
auto item = GetSelection();
@ -1549,5 +1557,17 @@ bool ObjectList::has_multi_part_objects()
return false;
}
void ObjectList::update_settings_items()
{
wxDataViewItemArray items;
m_objects_model->GetChildren(wxDataViewItem(0), items);
for (auto& item : items) {
const wxDataViewItem& settings_item = m_objects_model->GetSettingsItem(item);
select_item(settings_item ? settings_item : m_objects_model->AddSettingsChild(item));
}
UnselectAll();
}
} //namespace GUI
} //namespace Slic3r