diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 84aca3442..75f6c83cb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1469,7 +1469,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page) } if(logs) std::cout << "create page " << label.c_str() <<" : "<< params[params.size() - 1] << "\n"; - current_page = add_options_page(_(label), params[params.size() - 1]); + current_page = add_options_page(L(label), params[params.size() - 1]); } else if (boost::starts_with(full_line, "end_page")) { @@ -4020,7 +4020,7 @@ void TabSLAMaterial::build() if (create_pages("sla_material.ui")) return; - auto page = add_options_page(_(L("Material")), "resin"); + auto page = add_options_page(L("Material"), "resin"); auto optgroup = page->new_optgroup(L("Material")); optgroup->append_single_option_line("bottle_cost"); diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index edd5bbaee..4f100d650 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -325,6 +325,8 @@ public: void update_visibility(); virtual void msw_rescale(); virtual void sys_color_changed(); + size_t get_page_count() { return m_pages.size(); } + PageShp get_page(size_t idx) { return m_pages[idx]; } Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const; std::pair get_custom_ctrl_with_blinking_ptr(const t_config_option_key& opt_key, int opt_index = -1); diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index 02c61b416..364f2fd57 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -1063,9 +1063,10 @@ void UnsavedChangesDialog::update_tree(Preset::Type type, PresetCollection* pres wxString new_val = from_u8((boost::format("%1%") % new_config.opt("extruder_colour")->values.size()).str()); ItemData item_data = { "extruders_count", local_label, old_val, new_val, type }; - m_items_map.emplace(m_tree_model->AddOption(type, _L("General"), _L("Capabilities"), local_label, old_val, new_val, category_icon_map.at("General")), item_data); - + if(wxGetApp().get_tab(type)->get_page_count() > 0) + m_items_map.emplace(m_tree_model->AddOption(type, _L(wxGetApp().get_tab(type)->get_page(0)->title()), _L("Capabilities"), local_label, old_val, new_val, category_icon_map.at(wxGetApp().get_tab(type)->get_page(0)->title())), item_data); } + //TODO same for milling head? for (const std::string& opt_key : dirty_options) { const Search::Option& option = searcher.get_option(opt_key);