mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Merge pull request #2324 from mikeiit/develop
Fixed selection update in saving screen
This commit is contained in:
commit
c2845d120b
@ -36,10 +36,10 @@ CSavingScreen::CSavingScreen()
|
||||
localMi->mapHeader = std::unique_ptr<CMapHeader>(new CMapHeader(*LOCPLINT->cb->getMapHeader()));
|
||||
|
||||
tabSel = std::make_shared<SelectionTab>(screenType);
|
||||
curTab = tabSel;
|
||||
tabSel->toggleMode();
|
||||
|
||||
tabSel->callOnSelect = std::bind(&CSavingScreen::changeSelection, this, _1);
|
||||
tabSel->toggleMode();
|
||||
curTab = tabSel;
|
||||
|
||||
buttonStart = std::make_shared<CButton>(Point(411, 535), "SCNRSAV.DEF", CGI->generaltexth->zelp[103], std::bind(&CSavingScreen::saveGame, this), EShortcut::LOBBY_SAVE_GAME);
|
||||
}
|
||||
|
||||
@ -62,6 +62,7 @@ void CSavingScreen::changeSelection(std::shared_ptr<CMapInfo> to)
|
||||
|
||||
localMi = to;
|
||||
card->changeSelection();
|
||||
card->redraw();
|
||||
}
|
||||
|
||||
void CSavingScreen::saveGame()
|
||||
|
@ -419,7 +419,9 @@ void SelectionTab::select(int position)
|
||||
auto filename = *CResourceHandler::get("local")->getResourceName(ResourceID(curItems[py]->fileURI, EResType::CLIENT_SAVEGAME));
|
||||
inputName->setText(filename.stem().string());
|
||||
}
|
||||
|
||||
updateListItems();
|
||||
redraw();
|
||||
if(callOnSelect)
|
||||
callOnSelect(curItems[py]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user