Try fix wxwidget problem with '<' and '>'

supermerill/SuperSlicer#1837
This commit is contained in:
supermerill 2021-11-09 14:41:15 +01:00
parent 5b03c19bae
commit 4e266a5806

View File

@ -922,8 +922,14 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
config.opt<ConfigOptionFloats>(opt_key)->get_at(opt_idx); config.opt<ConfigOptionFloats>(opt_key)->get_at(opt_idx);
return double_to_string(val, opt->precision); return double_to_string(val, opt->precision);
} }
case coString: case coString: {
return from_u8(config.opt_string(opt_key)); //character '<' '>' create strange problems for wxWidget, so remove them (only for the display)
std::string str = config.opt_string(opt_key);
boost::erase_all(str, "<");
boost::erase_all(str, ">");
return from_u8(str);
}
case coStrings: { case coStrings: {
const ConfigOptionStrings* strings = config.opt<ConfigOptionStrings>(opt_key); const ConfigOptionStrings* strings = config.opt<ConfigOptionStrings>(opt_key);
if (strings) { if (strings) {