1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-15 13:33:36 +02:00

Remove excessive totalRedraw's

This commit is contained in:
Ivan Savenko 2023-03-22 00:57:08 +02:00
parent a78f7de9cd
commit c81d57ab8c
4 changed files with 5 additions and 6 deletions

View File

@ -583,6 +583,7 @@ void CPlayerInterface::heroInGarrisonChange(const CGTownInstance *town)
castleInt->garr->setArmy(town->visitingHero, 1);
castleInt->garr->recreateSlots();
castleInt->heroes->update();
castleInt->redraw();
}
for (auto isa : GH.listInt)
{
@ -591,9 +592,9 @@ void CPlayerInterface::heroInGarrisonChange(const CGTownInstance *town)
{
ki->townChanged(town);
ki->updateGarrisons();
ki->redraw();
}
}
GH.totalRedraw();
}
void CPlayerInterface::heroVisitsTown(const CGHeroInstance* hero, const CGTownInstance * town)
{

View File

@ -1404,6 +1404,7 @@ void CAdvMapInt::aiTurnStarted()
mapAudio->onEnemyTurnStarted();
adventureInt->minimap->setAIRadar(true);
adventureInt->infoBar->startEnemyTurn(LOCPLINT->cb->getCurrentPlayer());
adventureInt->minimap->showAll(screen);//force refresh on inactive object
adventureInt->infoBar->showAll(screen);//force refresh on inactive object
}

View File

@ -77,7 +77,7 @@ void CList::CListItem::onSelect(bool on)
if(on)
selection = genSelection();
select(on);
GH.totalRedraw();
redraw();
}
CList::CList(int Size, Point position, std::string btnUp, std::string btnDown, size_t listAmount, int helpUp, int helpDown, CListBox::CreateFunc create)

View File

@ -222,10 +222,7 @@ void CMinimap::setAIRadar(bool on)
aiShield->disable();
update();
}
// this may happen during AI turn when this interface is inactive
// force redraw in order to properly update interface
GH.totalRedraw();
redraw();
}
void CMinimap::updateTile(const int3 &pos)