mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-04-29 22:24:26 +02:00
fix: beginResetModel called before endResetModel
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
564f120c22
commit
cddf00c61b
@ -295,13 +295,11 @@ void VersionProxyModel::sourceDataChanged(const QModelIndex& source_top_left, co
|
||||
void VersionProxyModel::setSourceModel(QAbstractItemModel* replacingRaw)
|
||||
{
|
||||
auto replacing = dynamic_cast<BaseVersionList*>(replacingRaw);
|
||||
beginResetModel();
|
||||
|
||||
m_columns.clear();
|
||||
if (!replacing) {
|
||||
roles.clear();
|
||||
filterModel->setSourceModel(replacing);
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -343,8 +341,6 @@ void VersionProxyModel::setSourceModel(QAbstractItemModel* replacingRaw)
|
||||
hasLatest = true;
|
||||
}
|
||||
filterModel->setSourceModel(replacing);
|
||||
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
QModelIndex VersionProxyModel::getRecommended() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user