fix world size uninitialized memory and UI refresh signal

Signed-off-by: captivator <84224501+qaptivator@users.noreply.github.com>
This commit is contained in:
captivator 2026-04-17 15:12:22 +03:00
parent 4872ec634c
commit cbaf45084e

View file

@ -157,7 +157,8 @@ bool WorldList::resetIcon(int row)
return false;
World& m = m_worlds[row];
if (m.resetIcon()) {
emit dataChanged(index(row), index(row), { WorldList::IconFileRole });
QModelIndex modelIndex = index(row, NameColumn);
emit dataChanged(modelIndex, modelIndex, { WorldList::IconFileRole });
return true;
}
return false;
@ -426,7 +427,7 @@ void WorldList::loadWorldsAsync()
m_worlds[row].setSize(size);
// Notify views
QModelIndex modelIndex = index(row);
QModelIndex modelIndex = index(row, SizeColumn);
emit dataChanged(modelIndex, modelIndex, { SizeRole });
}
},