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.
This commit is contained in:
Vojtech Bubnik 2020-11-28 11:13:46 +01:00
parent 6beb493255
commit 3dd6d7e878

View file

@ -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)