From 3f6d3b903d836e78047af5b3824d7a2ffb526896 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 30 Jul 2018 10:35:08 +0200 Subject: [PATCH] Fixed rotation of 3D view camera after change of bed data --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 46bcf4f44..872ae2dc6 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1947,6 +1947,12 @@ void GLCanvas3D::set_bed_shape(const Pointfs& shape) m_axes.origin = Pointf3(0.0, 0.0, (coordf_t)GROUND_Z); set_axes_length(0.3f * (float)m_bed.get_bounding_box().max_size()); + // forces the selection of the proper camera target + if (m_volumes.volumes.empty()) + zoom_to_bed(); + else + zoom_to_volumes(); + m_dirty = true; }