FIX: config: fix the warning string missing issue

also fix the assert
jira: no-jira

Change-Id: I6becb689ff6a1dd2894d5004da796ece8fb23324
This commit is contained in:
lane.wei 2024-11-22 19:54:36 +08:00
parent 8d93a26c5b
commit ab588003e3

View File

@ -324,6 +324,14 @@ static void add_config_substitutions(const ConfigSubstitutions& conf_substitutio
new_val = wxString("\"") + values[val] + "\"" + " (" + from_u8(_utf8(labels[val])) + ")";
break;
}
case coEnums:
{
const std::vector<std::string>& labels = def->enum_labels;
const std::vector<std::string>& values = def->enum_values;
std::string val = conf_substitution.new_value->serialize();
new_val = wxString("\"") + from_u8(_utf8(val)) + "\"";
break;
}
case coBool:
new_val = conf_substitution.new_value->getBool() ? "true" : "false";
break;