From c0ff8b888806765b178965a8ed2dfa5ebf19bb23 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 23 Aug 2021 10:07:06 +0200 Subject: [PATCH] Fix of hint notification button Open Gallery. Deselects all objects prior opening gallery. --- src/slic3r/GUI/HintNotification.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp index dd215052db..2b079b6ffb 100644 --- a/src/slic3r/GUI/HintNotification.cpp +++ b/src/slic3r/GUI/HintNotification.cpp @@ -3,6 +3,7 @@ #include "format.hpp" #include "I18N.hpp" #include "GUI_ObjectList.hpp" +#include "GLCanvas3D.hpp" #include "libslic3r/AppConfig.hpp" #include "libslic3r/Utils.hpp" #include "libslic3r/Config.hpp" @@ -305,7 +306,10 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path) m_loaded_hints.emplace_back(hint_data); } else if (dict["hypertext_type"] == "gallery") { - HintData hint_data{ text1, hypertext_text, follow_text, disabled_tags, enabled_tags, false, documentation_link, []() { wxGetApp().obj_list()->load_shape_object_from_gallery(); } }; + HintData hint_data{ text1, hypertext_text, follow_text, disabled_tags, enabled_tags, false, documentation_link, []() { + // Deselect all objects, otherwise gallery wont show. + wxGetApp().plater()->canvas3D()->deselect_all(); + wxGetApp().obj_list()->load_shape_object_from_gallery(); } }; m_loaded_hints.emplace_back(hint_data); } } else {