Repository navigation
Save a user preset without inheriting from a project-embedded preset (#1207) - #1235
Open
alandebortolo wants to merge 1 commit into
Open
alandebortolo wants to merge 1 commit into
alandebortolo wants to merge 1 commit into
Conversation
Author
|
CI on my fork for a72fcbf (run https://github.com/DesignMaster-Solutions/OrcaSlicer/actions/runs/44896319132): Snapmaker_Orca builds on Linux (ubuntu-24.04) and Windows (windows-2022), and both Flatpak builds pass. The macOS job stopped in Build Deps before reaching our code, on a Homebrew download error ("Failed to download resource zstd" from ghcr.io), so I re-ran it and will post the result here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1207.
What happens today: "Save as User preset" on a process preset that came from a 3mf writes a user preset whose
inheritsis the Project-inside preset (for example0.24mm Standard figet star (converted)(10+STAR+FIDGET+TOY-U1.3mf)), and only the keys that differ from it. That parent exists only while that 3mf is open, so in any other project the saved user preset loses its base and cannot be used, which is what the reporter hit.Change (
PresetCollection::save_current_preset, 19 lines): when the preset is saved to the user folder (save_to_project == false) and its parent is project-embedded, the link is moved up to the first ancestor that is not project-embedded:inheritsis cleared and the full config is saved, assave(nullptr)already does for detached presets;save_to_project == true), or a parent that is a system/user preset → unchanged.The edited values are not touched:
preset.configalready holds the full edited config, only the parent used for the diff changes.Checked: the same loop in a standalone harness with a name→preset map: converted project preset →
"", project over system → system name, a chain of two project presets → system name, system/user parent andsave_to_projectunchanged, missing parent unchanged, a self-referencing project preset terminates (depth cap 8). Mutants (!is_project_embeddedflipped,!save_to_projectflipped) fail the harness.Limits: not run in the GUI; the fork CI build is the compile check. Presets already saved with a project parent are not migrated; for those the reporter has a flatten script in the issue thread.