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:
parent
485361939a
commit
69ee1a9098
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user