Sync upstream main

Pulls latest upstream fixes (Default filament option #13887, SEMM
multi-extruder crash #13896, linux wxstring crash #13925, Polymaker
profiles, et al.).
This commit is contained in:
Clifford Garwood
2026-05-29 09:50:18 -04:00
1309 changed files with 30869 additions and 26749 deletions
+13 -5
View File
@@ -2879,6 +2879,14 @@ void PresetBundle::load_selections(AppConfig &config, const PresetPreferences& p
if (use_default_nozzle_volume_type) {
project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type")->values = current_printer.config.option<ConfigOptionEnumsGeneric>("default_nozzle_volume_type")->values;
} else {
// Orca: make sure `nozzle_volume_type` not shorter than `default_nozzle_volume_type`, otherwise we got array out of bound access
// later in `Tab::switch_excluder`
auto& opt = project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type")->values;
const auto& opt_default = current_printer.config.option<ConfigOptionEnumsGeneric>("default_nozzle_volume_type")->values;
while (opt.size() < opt_default.size()) {
opt.emplace_back(opt_default[opt.size()]);
}
}
// Parse the initial physical printer name.
@@ -4103,13 +4111,13 @@ DynamicPrintConfig PresetBundle::full_fff_config(bool apply_extruder, std::optio
opt->value = boost::algorithm::clamp<int>(opt->value, 0, int(num_filaments));
}
static const char* keys_1based[] = {"wall_filament", "sparse_infill_filament", "solid_infill_filament"};
for (size_t i = 0; i < sizeof(keys_1based) / sizeof(keys_1based[0]); ++ i) {
std::string key = std::string(keys_1based[i]);
static const char* keys_with_default[] = {"wall_filament", "sparse_infill_filament", "solid_infill_filament"};
for (size_t i = 0; i < sizeof(keys_with_default) / sizeof(keys_with_default[0]); ++ i) {
std::string key = std::string(keys_with_default[i]);
auto *opt = dynamic_cast<ConfigOptionInt*>(out.option(key, false));
assert(opt != nullptr);
if(opt->value < 1 || opt->value > int(num_filaments))
opt->value = 1;
if(opt->value < 0 || opt->value > int(num_filaments))
opt->value = 0;
}
out.option<ConfigOptionString >("print_settings_id", true)->value = this->prints.get_selected_preset_name();
out.option<ConfigOptionStrings>("filament_settings_id", true)->values = this->filament_presets;