mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 09:45:54 +08:00
fix unsavedchangedialog when extruder count is changed
This commit is contained in:
parent
027bf9f132
commit
732a441b84
@ -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";
|
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"))
|
else if (boost::starts_with(full_line, "end_page"))
|
||||||
{
|
{
|
||||||
@ -4020,7 +4020,7 @@ void TabSLAMaterial::build()
|
|||||||
|
|
||||||
if (create_pages("sla_material.ui")) return;
|
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"));
|
auto optgroup = page->new_optgroup(L("Material"));
|
||||||
optgroup->append_single_option_line("bottle_cost");
|
optgroup->append_single_option_line("bottle_cost");
|
||||||
|
@ -325,6 +325,8 @@ public:
|
|||||||
void update_visibility();
|
void update_visibility();
|
||||||
virtual void msw_rescale();
|
virtual void msw_rescale();
|
||||||
virtual void sys_color_changed();
|
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;
|
Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const;
|
||||||
std::pair<OG_CustomCtrl*, bool*> get_custom_ctrl_with_blinking_ptr(const t_config_option_key& opt_key, int opt_index = -1);
|
std::pair<OG_CustomCtrl*, bool*> get_custom_ctrl_with_blinking_ptr(const t_config_option_key& opt_key, int opt_index = -1);
|
||||||
|
|
||||||
|
@ -1063,9 +1063,10 @@ void UnsavedChangesDialog::update_tree(Preset::Type type, PresetCollection* pres
|
|||||||
wxString new_val = from_u8((boost::format("%1%") % new_config.opt<ConfigOptionStrings>("extruder_colour")->values.size()).str());
|
wxString new_val = from_u8((boost::format("%1%") % new_config.opt<ConfigOptionStrings>("extruder_colour")->values.size()).str());
|
||||||
|
|
||||||
ItemData item_data = { "extruders_count", local_label, old_val, new_val, type };
|
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) {
|
for (const std::string& opt_key : dirty_options) {
|
||||||
const Search::Option& option = searcher.get_option(opt_key);
|
const Search::Option& option = searcher.get_option(opt_key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user