From 3bb9a5f290bad0709c107ee140c75e85fa1f3cb8 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 1 Dec 2021 15:44:44 +0100 Subject: [PATCH] Fixed loading translation of hint notification text and reloading this texts in other langs. --- src/slic3r/GUI/HintNotification.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp index 450067c48af..fc61ab62d86 100644 --- a/src/slic3r/GUI/HintNotification.cpp +++ b/src/slic3r/GUI/HintNotification.cpp @@ -294,6 +294,10 @@ void HintDatabase::uninit() write_used_binary(m_used_ids); } m_initialized = false; + m_loaded_hints.clear(); + m_sorted_hints = false; + m_used_ids.clear(); + m_used_ids_loaded = false; } void HintDatabase::init() { @@ -336,7 +340,8 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path) size_t weight = 1; bool was_displayed = is_used(id_string); //unescape text1 - unescape_string_cstyle(_utf8(dict["text"]), fulltext); + unescape_string_cstyle(dict["text"], fulltext); + fulltext = _utf8(fulltext); // replace and for imgui markers std::string marker_s(1, ImGui::ColorMarkerStart); std::string marker_e(1, ImGui::ColorMarkerEnd);