mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Merge remote-tracking branch 'origin/main' into feature/protobuf_config_and_dynamic_ui
Reconcile main's config changes with the protobuf codegen: - New settings ported to proto schema (already present) and verified in generated PrintConfigDef/Preset_options/TabLayout + PrintConfig.hpp: small_support_perimeter_speed, small_support_perimeter_threshold, top_layer_direction, bottom_layer_direction, hole_to_polyhole_max_edges - Ported main's label/tooltip updates for adaptive_pressure_advance_overhangs and adaptive_pressure_advance_bridges into filament.proto (were dropped in the conflict resolution) and regenerated. - Kept main's non-generated logic (Preset.cpp nullable filament override force-emit). Codegen validated (python tools/run_codegen.py --validate-only): PASSED.
This commit is contained in:
@@ -1491,6 +1491,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)
|
||||
|
||||
Reference in New Issue
Block a user