Fix: reset BuildVolume belt state when leaving belt mode (R1)

Non-belt branch of set_bed_shape reset only the 3DBed renderer, not the
BuildVolume; Bed3D::set_shape early-returns on unchanged bed, so a
belt->normal switch or in-place belt toggle-off left the BuildVolume with
m_is_belt_printer=true and inflated Y bounds -> out-of-bounds objects
treated as printable on a normal printer.
This commit is contained in:
harrierpigeon
2026-08-05 03:34:04 -05:00
parent c51d19f6b2
commit 88d5e9e442

View File

@@ -12387,6 +12387,12 @@ void Plater::priv::set_bed_shape(const Pointfs &shape,
// G-code load time (GCodeViewer::compute_belt_back_transform), so no mesh-side
// inverse needs to be pushed to the viewer here.
} else {
// Reset the BuildVolume belt state too: Bed3D::set_shape early-returns when
// the bed params are unchanged, so a belt->normal switch (or toggling belt off
// on the same printer) would otherwise leave the BuildVolume with
// m_is_belt_printer=true and an inflated Y bbox, wrongly treating out-of-bounds
// objects as printable. Idempotent for a printer that was never belt.
bed.build_volume().set_belt_printer(false, 0., false);
bed.set_belt_printer(false, 0.f);
if (preview)
preview->get_canvas3d()->get_gcode_viewer().set_belt_printer(false, 0.f);