1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Merge branch 'develop' into patch-4map_overview_rework

This commit is contained in:
Laserlicht
2023-10-02 21:03:16 +02:00
committed by GitHub
106 changed files with 2002 additions and 1209 deletions

View File

@ -108,11 +108,11 @@ bool mapSorter::operator()(const std::shared_ptr<ElementInfo> aaa, const std::sh
return (a->victoryIconIndex < b->victoryIconIndex);
break;
case _name: //by name
return boost::ilexicographical_compare(a->name, b->name);
return boost::ilexicographical_compare(a->name.toString(), b->name.toString());
case _fileName: //by filename
return boost::ilexicographical_compare(aaa->fileURI, bbb->fileURI);
default:
return boost::ilexicographical_compare(a->name, b->name);
return boost::ilexicographical_compare(a->name.toString(), b->name.toString());
}
}
else //if we are sorting campaigns
@ -122,9 +122,9 @@ bool mapSorter::operator()(const std::shared_ptr<ElementInfo> aaa, const std::sh
case _numOfMaps: //by number of maps in campaign
return aaa->campaign->scenariosCount() < bbb->campaign->scenariosCount();
case _name: //by name
return boost::ilexicographical_compare(aaa->campaign->getName(), bbb->campaign->getName());
return boost::ilexicographical_compare(aaa->campaign->getNameTranslated(), bbb->campaign->getNameTranslated());
default:
return boost::ilexicographical_compare(aaa->campaign->getName(), bbb->campaign->getName());
return boost::ilexicographical_compare(aaa->campaign->getNameTranslated(), bbb->campaign->getNameTranslated());
}
}
}
@ -363,7 +363,7 @@ void SelectionTab::showPopupWindow(const Point & cursorPosition)
return;
if(!curItems[py]->isFolder)
GH.windows().createAndPushWindow<CMapOverview>(curItems[py]->getName(), curItems[py]->fullFileURI, curItems[py]->date, ResourcePath(curItems[py]->fileURI), tabType);
GH.windows().createAndPushWindow<CMapOverview>(curItems[py]->getNameTranslated(), curItems[py]->fullFileURI, curItems[py]->date, ResourcePath(curItems[py]->fileURI), tabType);
else
CRClickPopup::createAndPush(curItems[py]->folderName);
}