mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix world size uninitialized memory and UI refresh signal (#5418)
This commit is contained in:
commit
e7322a4507
1 changed files with 3 additions and 2 deletions
|
|
@ -157,7 +157,8 @@ bool WorldList::resetIcon(int row)
|
||||||
return false;
|
return false;
|
||||||
World& m = m_worlds[row];
|
World& m = m_worlds[row];
|
||||||
if (m.resetIcon()) {
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -426,7 +427,7 @@ void WorldList::loadWorldsAsync()
|
||||||
m_worlds[row].setSize(size);
|
m_worlds[row].setSize(size);
|
||||||
|
|
||||||
// Notify views
|
// Notify views
|
||||||
QModelIndex modelIndex = index(row);
|
QModelIndex modelIndex = index(row, SizeColumn);
|
||||||
emit dataChanged(modelIndex, modelIndex, { SizeRole });
|
emit dataChanged(modelIndex, modelIndex, { SizeRole });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue