From 3dd6d7e878c42acca6f5e910191885c3b6c72a8c Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Sat, 28 Nov 2020 11:13:46 +0100 Subject: [PATCH] Escaping of ampersands in label texts (otherwise the ampersand is processed as a hotkey prefix and not displayed at all). Solves visualization of the new profile names containing ampersands (Original Prusa Mini & Mini+) Also the text was not correcly converted from UTF8. --- src/slic3r/GUI/Tab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 469a48527d..b95488112d 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1279,7 +1279,9 @@ void Tab::update_preset_description_line() } else if (parent == nullptr) { description_line = _(L("Current preset is inherited from the default preset.")); } else { - description_line = _(L("Current preset is inherited from")) + ":\n\t" + parent->name; + std::string name = parent->name; + boost::replace_all(name, "&", "&&"); + description_line = _(L("Current preset is inherited from")) + ":\n\t" + from_u8(name); } if (preset.is_default || preset.is_system)