PRUSA 2.7.0

This commit is contained in:
sunsets
2023-12-27 18:02:35 +08:00
parent b33112327f
commit 0a3c63dcb1
488 changed files with 92371 additions and 29443 deletions

View File

@@ -96,6 +96,13 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
};
field->m_parent = parent();
if (edit_custom_gcode && opt.is_code) {
field->m_fn_edit_value = [this](std::string opt_id) {
if (!m_disabled)
this->edit_custom_gcode(opt_id);
};
field->set_edit_tooltip(_L("Edit Custom G-code"));
}
field->m_back_to_initial_value = [this](std::string opt_id) {
if (!m_disabled)
this->back_to_initial_value(opt_id);
@@ -268,6 +275,7 @@ void OptionsGroup::activate_line(Line& line)
if (!custom_ctrl && m_use_custom_ctrl) {
custom_ctrl = new OG_CustomCtrl(is_legend_line || !staticbox ? this->parent() : static_cast<wxWindow*>(this->stb), this);
wxGetApp().UpdateDarkUI(custom_ctrl);
if (is_legend_line)
sizer->Add(custom_ctrl, 0, wxEXPAND | wxLEFT, wxOSX ? 0 : 10);
else
@@ -904,9 +912,10 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
ret = double_to_string(val);
}
break;
case coString:
case coString: {
ret = from_u8(config.opt_string(opt_key));
break;
}
case coStrings:
if (opt_key == "compatible_printers" || opt_key == "compatible_prints" || opt_key == "gcode_substitutions") {
ret = config.option<ConfigOptionStrings>(opt_key)->values;
@@ -921,8 +930,8 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
else if (opt->gui_flags == "serialized") {
std::vector<std::string> values = config.option<ConfigOptionStrings>(opt_key)->values;
if (!values.empty() && !values[0].empty())
for (auto el : values)
text_value += el + ";";
for (const std::string& el : values)
text_value += from_u8(el) + ";";
ret = text_value;
}
else
@@ -946,10 +955,6 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
case coPoints:
if (opt_key == "bed_shape")
ret = config.option<ConfigOptionPoints>(opt_key)->values;
else if (opt_key == "bed_exclude_area")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "thumbnails")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else
ret = config.option<ConfigOptionPoints>(opt_key)->get_at(idx);
break;
@@ -1004,7 +1009,7 @@ wxString OptionsGroup::get_url(const std::string& path_end)
if (path_end.empty())
return wxEmptyString;
wxString language = get_app_config()->get("translation_language");
wxString language = wxGetApp().current_language_code_safe();
wxString lang_marker = language.IsEmpty() ? "en" : language.BeforeFirst('_');
return wxString("https://help.qidi3d.com/") + lang_marker + wxString("/article/" + path_end);