1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Minor fix in using requestActionASAP (capture by val).
This commit is contained in:
Michał W. Urbańczyk 2012-03-26 11:38:51 +00:00
parent 13f26fc3cb
commit 7b7ddf987a
2 changed files with 4 additions and 1 deletions

View File

@ -809,7 +809,7 @@ void VCAI::showBlockingDialog(const std::string &text, const std::vector<Compone
if(!selection && cancel) //yes&no -> always answer yes, we are a brave AI :)
sel = 1;
requestActionASAP([&]()
requestActionASAP([=]()
{
cb->selectionMade(sel, askID);
});

View File

@ -2114,6 +2114,9 @@ void OptionsTab::flagPressed( int color )
if(old)
{
entries[old->color]->selectButtons();
if(old->hero >= 0)
usedHeroes.erase(old->hero);
old->hero = entries[old->color]->pi.defaultHero();
}