From c8f24986819a8aa5c141ccf59c9c2a0a1c9c2e43 Mon Sep 17 00:00:00 2001 From: HanifKoh <76276251+HanifKoh@users.noreply.github.com> Date: Thu, 8 Oct 2026 14:02:34 +0800 Subject: [PATCH] Keep GLCanvas3D Building With SLIC3R_CAD Off (#16256) The bed-axes toggle added for the Design tab's reference planes reads m_design_sketch_tool, which only exists under SLIC3R_CAD. Compute the flag once and read the sketch tool inside the same guard as its other uses. --- src/slic3r/GUI/GLCanvas3D.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 6ad3e80dc0..94ecfb69b6 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2427,11 +2427,15 @@ void GLCanvas3D::_render_scene(const Camera& camera, const Size& cnv_size) if (m_canvas_type == ECanvasType::CanvasView3D) { // m_show_bed gates the plate list too: hiding the bed but leaving its grid and outline // floating would read as a rendering fault rather than a deliberate view option. - // Design tab: while its reference planes are up they draw their own axes from the modeling - // origin, where the bed's triad would otherwise sit on top of them. - if (show_bed) - _render_bed(camera.get_view_matrix(), camera.get_projection_matrix(), !camera.is_looking_downward(), - m_show_world_axes && !(m_design_sketch_tool != nullptr && m_design_sketch_tool->draws_reference_axes())); + if (show_bed) { + bool show_axes = m_show_world_axes; +#ifdef SLIC3R_CAD + // Design tab: while its reference planes are up they draw their own axes from the modeling + // origin, where the bed's triad would otherwise sit on top of them. + show_axes = show_axes && !(m_design_sketch_tool != nullptr && m_design_sketch_tool->draws_reference_axes()); +#endif + _render_bed(camera.get_view_matrix(), camera.get_projection_matrix(), !camera.is_looking_downward(), show_axes); + } m_frame_profiler.mark("bed"); if (show_bed) //BBS: add outline logic _render_platelist(camera.get_view_matrix(), camera.get_projection_matrix(), !camera.is_looking_downward(), only_current, only_body, hover_id, true, show_grid);