Fixed: Ingame map search and search result tooltips for UTF8 strings

develop
Nimetu 4 years ago
parent 720f6da8b9
commit b4901bf267

@ -2471,7 +2471,8 @@ void CGroupMap::updateMatchedLandmarks()
std::vector<std::pair<string,string> > params;
params.clear();
params.push_back(std::pair<string,string>("id", toString("lm%d", k)));
params.push_back(std::pair<string,string>("tooltip", _MatchedLandmarks[k].Title.toUtf8()));
// ctrl base expects utf8 string to start with "u:"
params.push_back(std::pair<string,string>("tooltip", "u:" + _MatchedLandmarks[k].Title.toUtf8()));
params.push_back(std::pair<string,string>("index", toString(k)));
CInterfaceGroup *g = CWidgetManager::getInstance()->getParser()->createGroupInstance("lm_search_result", pL->getId(), params);
@ -2675,7 +2676,7 @@ void CGroupMap::setLandmarkFilter(const std::string &s)
if (!s.empty()) {
ucstring ucs;
ucs.fromUtf8(s);
splitUCString(toLower(s), ucstring(" "), _LandmarkFilter);
splitUCString(toLower(ucs), ucstring(" "), _LandmarkFilter);
}
// recreate landmarks

Loading…
Cancel
Save