Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2020-11-28 13:13:46 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2020-11-28 13:13:46 +0300
commit3dd6d7e878c42acca6f5e910191885c3b6c72a8c (patch)
tree157263ada3b4278920d965be25035eaea4c69697
parent6beb49325550cd83c2b20a81fa4e18fe0174f48c (diff)
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.
-rw-r--r--src/slic3r/GUI/Tab.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 469a48527..b95488112 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)