Skip to content

fix: restore mixed-filament confirmation when switching to Preview tab - #783

Closed
iesteem wants to merge 1 commit into
release_2_3_6from
fix_2_3_6_top_cover
Closed

fix: restore mixed-filament confirmation when switching to Preview tab#783
iesteem wants to merge 1 commit into
release_2_3_6from
fix_2_3_6_top_cover

Conversation

@iesteem

@iesteem iesteem commented Aug 27, 2026

Copy link
Copy Markdown

Description

Restores the secondary confirmation dialog for mixed high/low temperature filaments when switching from the Prepare tab to the Preview tab.

Background

When a plate mixes high-temperature and low-temperature filaments and "Allow high/low temperature filament mixing" is enabled in Preferences:

  • Clicking Slice Plate or Slice All correctly shows a confirmation dialog before slicing starts.
  • Switching from Prepare to Preview used to show the same confirmation (in 2.3.5), but a regression introduced by fix: unify filament temp mixing blocking with plate error gating #589 silently dropped it — the switch auto-started slicing with no prompt.

(In 2.3.5 the Preview switch was implemented by re-posting the "Slice All" event, which incidentally carried the confirmation. #589 removed that repost — correctly, because it sliced all plates when only the selected plate should be sliced — but the confirmation was lost along with it.)

Changes

  • Restore the confirmation on Preview tab switch (EVT_GLVIEWTOOLBAR_PREVIEW handler in Plater.cpp): when the switch would auto-start slicing and the current plate has mixed high/low temperature filaments, show the same single-plate confirmation dialog as the Slice Plate button.
    • Confirm → slice only the currently selected plate (single plate, not all plates) and stay on the Preview page.
    • Cancel → stay on the Prepare page; no panel switch and no slicing (the MainFrame tab is switched back, mirroring the 2.3.5 behavior).
  • New predicate Plater::preview_switch_triggers_slice() (Plater.cpp / Plater.hpp): mirrors the slice branch conditions of Plater::priv::set_current_panel's do_reslice (non-empty model, printable instances on the current plate, stale slice result, no export/slicing in progress, model inside the print volume), so the dialog only appears when slicing would actually start.
  • Align the Slice All dialog text with the Slice Plate dialog: filament_temp_mixing_warning_text_slice_all() now includes the same risk-warning sentence ("Mixed printing may result in extruder clogging, nozzle damage, or layer adhesion issues.") that was previously missing from the slice-all variant.

Hard-blocked plates (mixing not allowed via Preferences) keep the existing behavior: notification sync + no slicing, no dialog.

Screenshots/Recordings/Graphs

N/A (behavioral fix; dialog layout unchanged — only the slice-all warning text gained the risk sentence).

Tests

  • Incremental build of libslic3r_gui passes (MSVC).
  • Manual, mixed filaments + mixing allowed in Preferences:
    • Slice Plate → confirmation shown once; Confirm slices.
    • Slice All → confirmation shown once with per-plate breakdown incl. risk sentence; Confirm slices.
    • Prepare → Preview switch → confirmation shown once; Confirm slices only the selected plate and lands on Preview.
    • Prepare → Preview switch → Cancel → stays on Prepare, no slicing starts.
    • Preview tab re-clicked while already on Preview → no unexpected dialog.
    • Preview thumbnail-triggered reslice → existing guards unaffected.
    • Mixing NOT allowed in Preferences → hard block (notification, no dialog), unchanged.

A regression from #589 removed the confirmation dialog on Prepare ->
Preview switch. When the switch would auto-start slicing and the plate
has mixed high/low temperature filaments (allowed via Preferences),
show the same single-plate confirmation as the Slice Plate button;
declining stays on the Prepare page without slicing.

Also align the slice-all confirmation text with the single-plate dialog
by including the risk warning sentence.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@iesteem iesteem closed this Aug 28, 2026
@iesteem
iesteem deleted the fix_2_3_6_top_cover branch August 28, 2026 09:41
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