From 96fb6dff29e20742d1053c21a87047b76b660d3e Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 18 Mar 2019 12:37:14 +0100 Subject: [PATCH 1/2] Fixed GLVolume::get_volume_scaling_factor() declaration --- src/slic3r/GUI/3DScene.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 5daf4b941..15ac6a3a1 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -364,7 +364,7 @@ public: void set_volume_rotation(const Vec3d& rotation) { m_volume_transformation.set_rotation(rotation); set_bounding_boxes_as_dirty(); } void set_volume_rotation(Axis axis, double rotation) { m_volume_transformation.set_rotation(axis, rotation); set_bounding_boxes_as_dirty(); } - Vec3d get_volume_scaling_factor() const { return m_volume_transformation.get_scaling_factor(); } + const Vec3d& get_volume_scaling_factor() const { return m_volume_transformation.get_scaling_factor(); } double get_volume_scaling_factor(Axis axis) const { return m_volume_transformation.get_scaling_factor(axis); } void set_volume_scaling_factor(const Vec3d& scaling_factor) { m_volume_transformation.set_scaling_factor(scaling_factor); set_bounding_boxes_as_dirty(); } From a5b202aa1d28c0c3280f42f63b9af0bc394d4ca9 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 18 Mar 2019 12:59:52 +0100 Subject: [PATCH 2/2] Fix of #1955 and #1874 --- src/slic3r/GUI/GUI_Preview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index 2211e8d7d..69f255be1 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -365,6 +365,9 @@ void Preview::load_print() void Preview::reload_print(bool force, bool keep_volumes) { + if (!IsShown() && !force) + return; + if (!keep_volumes) { m_canvas->reset_volumes(); @@ -372,9 +375,6 @@ void Preview::reload_print(bool force, bool keep_volumes) m_loaded = false; } - if (!IsShown() && !force) - return; - load_print(); }