Skip to content

[port] Snap #1052: switch edited filament preset on single-filament sync - #647

Draft
aceRage wants to merge 2 commits into
mainfrom
cursor/snap-1052-single-filament-sync-9d68
Draft

aceRage wants to merge 2 commits into
mainfrom
cursor/snap-1052-single-filament-sync-9d68

Conversation

@aceRage

@aceRage aceRage commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Description

Careful port of Snapmaker #1052 (merged to build_platform_engineering). Single-filament projects assemble the slice from the edited filament preset (PresetBundle::full_fff_config()), but machine sync only renamed filament_presets[i]. After a 1-filament sync of a different type (PLA↔PETG), the pre-print page kept the old filament and the print could not be started.

Adaptations (not a cherry-pick)

Edge's match lives in Sidebar::apply_machine_filament_sync (shared by U1 and Elegoo CANVAS). Slot 0's matched name is recorded after Edge's own fallback:

  1. CANVAS Generic @ECC (canvas_generic_preset_name)
  2. then resolve_filament_preset(... vendor, colour)

Upstream records a single resolve_filament_preset(name, type) inside show_sync_filament_dialog. That would skip the CANVAS Generic path.

After on_filaments_change, if there is one filament and the edited preset is not the slot-0 match, CallAfter re-fetches wxGetApp().plater() and runs Edge's normal filament-select path (Tab::select_preset then Plater::on_config_change) so the Tab and config propagate without freezing the UI. on_config_change also runs for multi-filament syncs, as upstream. No profile JSON was rewritten.

Screenshots/Recordings/Graphs

N/A (logic fix, no UI layout change).

Overlap

Touches src/slic3r/GUI/Plater.cpp next to two open Edge PRs. Keep this diff to the shared sync tail; rebase whichever lands second.

Tests

GUI-only path (wx CallAfter / Tab::select_preset). No new Catch2 cases. Catch2 binaries were not present in this environment.

Broker (owed, REAPER C:/Dev/wt_snap-1052): libslic3r_tests + slic3rutils_tests. Gate: --gate expected identical=10 / diff=0 (no G-code change). Russ review.

Manual (U1 / CANVAS)

  • 1-filament project, sync a different filament (cross-category, e.g. PLA↔PETG): slice uses the synced preset, pre-print shows it, UI does not freeze.
  • CANVAS Generic spool: slot 0 uses the Generic @ECC (or Generic type) preset, then the same 1-filament switch.
  • Multi-filament (≥2): per-slot presets/colors update, a reslice is scheduled, no freeze.
  • Dirty edited preset, Cancel on the discard prompt: edited preset kept, slot reverted, colors still sync.

job 357: built @2fc6ddb2fb; libslic3r_tests 2261/2264 (3 expected fails), slic3rutils_tests 1314/1314, GATE_RESULT identical=10 config_only=0 diff=0 failed=0 missing=0 vs windows baseline 6b47212, copy: C:\Dev\EdgeSlicerTest\pr647

Open in Web Open in Cursor 

aceRage and others added 2 commits October 20, 2026 15:10
…napmaker#1052)

Single-filament projects slice from the edited filament preset
(PresetBundle::full_fff_config), but machine sync only renamed
filament_presets[i]. After Edge's CANVAS Generic / vendor-colour
fallback, defer Tab::select_preset plus on_config_change via CallAfter
so the pre-print page and the next slice use the synced filament
without freezing the UI.

Deft

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Avoid a second wxGetApp() lookup between the null check and full_config().

Deft

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant