mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
OptionsSearcher improvements: Fixed a key for option() and groups_and_categories.
It contains "preset_type;opt_key" now. This key helps to avoid a collisions by using a same options key from different type presets. Example: Option "elefant_foot_compensation" is in Print presets and SLA_printer presets
This commit is contained in:
parent
10c3e82917
commit
991fa67fd1
7 changed files with 59 additions and 41 deletions
|
@ -3802,8 +3802,8 @@ wxSizer* TabPrinter::create_bed_shape_widget(wxWindow* parent)
|
|||
{
|
||||
Search::OptionsSearcher& searcher = wxGetApp().sidebar().get_searcher();
|
||||
const Search::GroupAndCategory& gc = searcher.get_group_and_category("bed_shape");
|
||||
searcher.add_key("bed_custom_texture", gc.group, gc.category);
|
||||
searcher.add_key("bed_custom_model", gc.group, gc.category);
|
||||
searcher.add_key("bed_custom_texture", m_type, gc.group, gc.category);
|
||||
searcher.add_key("bed_custom_model", m_type, gc.group, gc.category);
|
||||
}
|
||||
|
||||
return sizer;
|
||||
|
@ -4044,7 +4044,6 @@ ConfigOptionsGroupShp Page::new_optgroup(const wxString& title, int noncommon_la
|
|||
{
|
||||
//! config_ have to be "right"
|
||||
ConfigOptionsGroupShp optgroup = std::make_shared<ConfigOptionsGroup>(m_parent, title, m_config, true);
|
||||
optgroup->set_config_category(m_title.ToStdString());
|
||||
if (noncommon_label_width >= 0)
|
||||
optgroup->label_width = noncommon_label_width;
|
||||
|
||||
|
@ -4053,6 +4052,7 @@ ConfigOptionsGroupShp Page::new_optgroup(const wxString& title, int noncommon_la
|
|||
#else
|
||||
auto tab = parent()->GetParent();// GetParent();
|
||||
#endif
|
||||
optgroup->set_config_category_and_type(m_title, static_cast<Tab*>(tab)->type());
|
||||
optgroup->m_on_change = [tab](t_config_option_key opt_key, boost::any value) {
|
||||
//! This function will be called from OptionGroup.
|
||||
//! Using of CallAfter is redundant.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue