mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-15 00:31:47 +08:00
Use full_label on setting override for object/modifiers.
This commit is contained in:
parent
4151e8fab0
commit
27a6ce3aed
@ -1453,6 +1453,7 @@ public:
|
||||
// The full label is shown, when adding an override parameter for an object or a modified object.
|
||||
std::string label;
|
||||
std::string full_label;
|
||||
std::string get_full_label() const { return !full_label.empty() ? full_label : label; }
|
||||
// With which printer technology is this configuration valid?
|
||||
PrinterTechnology printer_technology = ptUnknown;
|
||||
// Category of a configuration field, from the GUI perspective.
|
||||
|
@ -1216,7 +1216,7 @@ void ObjectList::get_options_menu(settings_menu_hierarchy& settings_menu, const
|
||||
if (improper_category(category, extruders_cnt, !is_part))
|
||||
continue;
|
||||
|
||||
const std::string& label = !opt->full_label.empty() ? opt->full_label : opt->label;
|
||||
const std::string& label = opt->get_full_label();
|
||||
std::pair<std::string, std::string> option_label(option, label);
|
||||
std::vector< std::pair<std::string, std::string> > new_category;
|
||||
std::vector< std::pair<std::string, std::string> >& cat_opt_label =
|
||||
|
@ -145,7 +145,13 @@ bool ObjectSettings::update_settings_list()
|
||||
option.opt.width = 12;
|
||||
if (is_extruders_cat)
|
||||
option.opt.max = wxGetApp().extruders_edited_cnt();
|
||||
//use the full label in the gui item
|
||||
std::string label = option.opt.label;
|
||||
option.opt.label = option.opt.get_full_label();
|
||||
//create the gui item
|
||||
optgroup->append_single_option_line(option);
|
||||
//restore label, in case of it's ised afterwards.
|
||||
option.opt.label = label;
|
||||
|
||||
optgroup->get_field(opt)->m_on_change = [optgroup](const std::string& opt_id, const boost::any& value) {
|
||||
// first of all take a snapshot and then change value in configuration
|
||||
|
@ -708,9 +708,9 @@ void GLGizmoHollow::on_render_input_window(float x, float y, float bottom_limit)
|
||||
double closing_d_max = opts[2].second->max;
|
||||
ConfigOptionMode closing_d_mode = opts[2].second->mode;
|
||||
|
||||
m_desc["offset"] = _(opts[0].second->label) + ":";
|
||||
m_desc["quality"] = _(opts[1].second->label) + ":";
|
||||
m_desc["closing_distance"] = _(opts[2].second->label) + ":";
|
||||
m_desc["offset"] = _(opts[0].second->get_full_label()) + ":";
|
||||
m_desc["quality"] = _(opts[1].second->get_full_label()) + ":";
|
||||
m_desc["closing_distance"] = _(opts[2].second->get_full_label()) + ":";
|
||||
|
||||
|
||||
RENDER_AGAIN:
|
||||
|
@ -1946,7 +1946,7 @@ void TabFilament::add_filament_overrides_page()
|
||||
Line line {"",""};
|
||||
if (opt_key == "filament_retract_lift_above" || opt_key == "filament_retract_lift_below") {
|
||||
Option opt = optgroup->get_option(opt_key);
|
||||
opt.opt.label = opt.opt.full_label;
|
||||
opt.opt.label = opt.opt.get_full_label();
|
||||
line = optgroup->create_single_option_line(opt);
|
||||
}
|
||||
else
|
||||
@ -3528,9 +3528,7 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
|
||||
/*std::string*/wxString name = "";
|
||||
if (opt.category != OptionCategory::none)
|
||||
name += _(toString(opt.category)) + " > ";
|
||||
name += !opt.full_label.empty() ?
|
||||
_(opt.full_label) :
|
||||
_(opt.label);
|
||||
name += opt.get_full_label();
|
||||
changes += tab + /*from_u8*/(name) + "\n";
|
||||
}
|
||||
// Show a confirmation dialog with the list of dirty options.
|
||||
|
Loading…
x
Reference in New Issue
Block a user