1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

fix remembering last map

This commit is contained in:
Laserlicht 2024-10-17 02:12:41 +02:00 committed by GitHub
parent c25aef8f48
commit 59dae43a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -693,7 +693,7 @@ void SelectionTab::selectFileName(std::string fname)
for(int i = (int)allItems.size() - 1; i >= 0; i--) for(int i = (int)allItems.size() - 1; i >= 0; i--)
{ {
if(allItems[i]->fileURI == fname) if(boost::to_upper_copy(allItems[i]->fileURI) == fname)
{ {
auto [folderName, baseFolder, parentExists, fileInFolder] = checkSubfolder(allItems[i]->originalFileURI); auto [folderName, baseFolder, parentExists, fileInFolder] = checkSubfolder(allItems[i]->originalFileURI);
curFolder = baseFolder != "" ? baseFolder + "/" : ""; curFolder = baseFolder != "" ? baseFolder + "/" : "";
@ -704,7 +704,7 @@ void SelectionTab::selectFileName(std::string fname)
for(int i = (int)curItems.size() - 1; i >= 0; i--) for(int i = (int)curItems.size() - 1; i >= 0; i--)
{ {
if(curItems[i]->fileURI == fname) if(boost::to_upper_copy(curItems[i]->fileURI) == fname)
{ {
slider->scrollTo(i); slider->scrollTo(i);
selectAbs(i); selectAbs(i);