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:
YuSanka 2021-03-24 10:45:37 +01:00
parent 10c3e82917
commit 991fa67fd1
7 changed files with 59 additions and 41 deletions

View file

@ -992,7 +992,7 @@ void Sidebar::search()
void Sidebar::jump_to_option(size_t selected)
{
const Search::Option& opt = p->searcher.get_option(selected);
wxGetApp().get_tab(opt.type)->activate_option(boost::nowide::narrow(opt.opt_key), boost::nowide::narrow(opt.category));
wxGetApp().get_tab(opt.type)->activate_option(opt.opt_key(), boost::nowide::narrow(opt.category));
// Switch to the Settings NotePad
// wxGetApp().mainframe->select_tab();