Repository navigation
fix(presets): review fixes for preset links and Send to Spoolman - #63
Merged
Merged
Conversation
- Edit Spool: read the link's previous value under the key the page sends (preset_link), so changing or clearing a link no longer always reports a conflict. - Send on your own linked preset: its saved values are yours, not a sign that Spoolman changed, so skip that check; clashes found at write time get a note that fits a preset Spooler doesn't rebuild. - Spool detail: the preset open in the filament settings leads, else the selected printer's. - A spool's own link is not sent: Spoolman keeps settings on the filament every spool of it shares.
- A link is used on a printer only when the preset fits it: OrcaSlicer's is_compatible for the selected printer, its compatible printers for another. Elsewhere, and for a name that isn't one of your presets, the spool keeps Spooler's preset (Sync makes it there). - Names of a plugin's presets (_local/...) can't be linked. - Send on a Spooler preset with no unsaved edits just says so. - parent_configs reads the selected parent's saved settings, not the edited copy find_preset() returns for it.
1 of 2 tasks
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.
Review fixes for #62 (preset links and Send to Spoolman).
Changes
Edit Spool, change or clear a link: the page sends the link's previous value as
was.*.preset_link, but the plugin read it underorca_filament_preset. Every change therefore looked as if Spoolman had changed meanwhile and was kept. The plugin now reads the key the page sends.Send on your own linked preset: the "Spoolman changed meanwhile" check compared the saved value with Spoolman's. That only means something for a Spooler preset, whose saved values come from Spoolman. For a linked preset the check is skipped. A clash found by the merge just before writing gets a note that fits a preset Spooler doesn't rebuild ("it changed there while you were editing"). The old note ("the preset now has it") was wrong for these presets.
Spool detail preselection: the preset open in OrcaSlicer's filament settings comes first, then the selected printer's. The snapshot now records the edited preset's name, read on the UI thread.
A spool's own link is not sent: Spoolman keeps settings on the filament, which every spool of it shares, so sending would change the other spools' presets. Send now refuses with a short reason in all six languages. A filament-level link still sends.
A link is used only where it fits: on the selected printer, OrcaSlicer's
is_compatible; on another, the preset's compatible printers (none listed and no condition means every printer). Both are read with the snapshot on the UI thread. On any other printer, and for a name that isn't one of your presets, the spool keeps Spooler's preset, and Sync makes it there. This fixes a "@voron" link being loaded into U1 slots._local/...names are rejected as links: linking one would stop Sync from making that preset.Unlinked "nothing to send": on a Spooler preset it now says "{name} has no unsaved changes to send." The "match Spoolman" wording is kept for linked presets, where it is actually checked.
parent_configs: it read the edited copy when the parent was the selected filament (the same
find_preset()behaviour). It now reads the saved preset.Test plan
ruff check; Python suite 724 tests OK._local/names rejected, the unlinked nothing-to-send text, the linked nothing-to-send text, and parent_configs reading the saved parent.