1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-05 13:04:54 +02:00

Fix crash on reordering towns from town interface

This commit is contained in:
Ivan Savenko 2025-01-01 20:59:59 +00:00
parent 485361939a
commit 69ee1a9098

View File

@ -471,8 +471,11 @@ void CTownList::CTownItem::gesture(bool on, const Point & initialPosition, const
int townLowerPos = (townIndex > towns.size() - 2) ? -1 : townIndex + 1;
auto updateList = [](){
for (auto ki : GH.windows().findWindows<CCastleInterface>())
ki->townChange(); //update list
for (auto ci : GH.windows().findWindows<CCastleInterface>())
{
ci->townlist->updateWidget();
ci->townlist->select(ci->town);
}
};
std::vector<RadialMenuConfig> menuElements = {