From 23b26cb3f3369967d4743b78608e81eda7986d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Fri, 25 Jun 2021 18:13:03 +0200 Subject: [PATCH] Fixed the issue where the object wasn't displayed after pressing the ESC key in the multi-material painting gizmo. key in the multi-material painting gizmo. Fixed also a similar issue in support and seam gizmos where an object was displayed with the wrong color after pressing the ESC key. --- src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp | 1 + src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp | 7 +++++++ src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp index 3274f000c..5fa4ab51d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp @@ -21,6 +21,7 @@ void GLGizmoFdmSupports::on_shutdown() { m_angle_threshold_deg = 0.f; m_parent.use_slope(false); + m_parent.toggle_model_objects_visibility(true); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index c6dced670..2ebf0d26e 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -19,6 +19,7 @@ namespace Slic3r::GUI { void GLGizmoMmuSegmentation::on_shutdown() { m_parent.use_slope(false); + m_parent.toggle_model_objects_visibility(true); } std::string GLGizmoMmuSegmentation::on_get_name() const diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp index d3c0c7d04..6b28e8ca7 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp @@ -16,6 +16,13 @@ namespace Slic3r::GUI { +void GLGizmoSeam::on_shutdown() +{ + m_parent.toggle_model_objects_visibility(true); +} + + + bool GLGizmoSeam::on_init() { m_shortcut_key = WXK_CONTROL_P; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp b/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp index d97bad10f..196fe5023 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp @@ -27,7 +27,7 @@ private: void update_from_model_object() override; void on_opening() override {} - void on_shutdown() override {} + void on_shutdown() override; // This map holds all translated description texts, so they can be easily referenced during layout calculations // etc. When language changes, GUI is recreated and this class constructed again, so the change takes effect.