This commit is contained in:
ExPikaPaka
2026-07-06 12:24:47 +02:00
949 changed files with 29621 additions and 12576 deletions

View File

@@ -1062,6 +1062,8 @@ static std::vector<std::string> s_Preset_print_options{
"bottom_surface_pattern",
"infill_direction",
"solid_infill_direction",
"top_layer_direction",
"bottom_layer_direction",
"counterbore_hole_bridging",
"infill_shift_step",
"sparse_infill_rotate_template",
@@ -1213,6 +1215,8 @@ static std::vector<std::string> s_Preset_print_options{
"wall_maximum_deviation",
"small_perimeter_speed",
"small_perimeter_threshold",
"small_support_perimeter_speed",
"small_support_perimeter_threshold",
"bridge_angle",
"internal_bridge_angle",
"relative_bridge_angle",
@@ -1290,6 +1294,7 @@ static std::vector<std::string> s_Preset_print_options{
"hole_to_polyhole",
"hole_to_polyhole_threshold",
"hole_to_polyhole_twisted",
"hole_to_polyhole_max_edges",
"mmu_segmented_region_max_width",
"mmu_segmented_region_interlocking_depth",
"small_area_infill_flow_compensation",
@@ -1872,6 +1877,26 @@ int PresetCollection::get_differed_values_to_update(Preset& preset, std::map<std
if (opt_src)
key_values[option] = opt_src->serialize();
}
// Orca: force-emit nullable filament override keys whenever they hold a nil ("off")
// value, even when the diff dropped them because the parent is nil too. Otherwise the
// key is absent from the synced profile and the cloud re-materializes it against the
// option's non-nil default (e.g. filament_retract_before_wipe -> 100%), silently
// resurrecting an override the user turned off. See GitHub issue on Retract Before Wipe.
if (m_type == Preset::TYPE_FILAMENT) {
for (const std::string& opt_key : filament_extruder_override_keys) {
if (key_values.count(opt_key))
continue; // already carried by the diff
const auto* opt_vec = dynamic_cast<const ConfigOptionVectorBase*>(preset.config.option(opt_key));
if (opt_vec == nullptr)
continue;
bool has_nil = false;
for (size_t i = 0; i < opt_vec->size(); ++i)
if (opt_vec->is_nil(i)) { has_nil = true; break; }
if (has_nil)
key_values[opt_key] = opt_vec->serialize();
}
}
}
else {
for (auto iter = preset.config.cbegin(); iter != preset.config.cend(); ++iter)