[vlc-commits] [Git][videolan/vlc][master] qt: fix model not refreshed when filter or parent is changed
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sun Apr 3 16:39:45 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
51435362 by Pierre Lamot at 2022-04-03T15:38:18+00:00
qt: fix model not refreshed when filter or parent is changed
invalidating the cache doesn't update the filter/sort order of the loader.
Changing the parent or the sort order completely change the model, so a reset is
preferable in the general case.
- - - - -
1 changed file:
- modules/gui/qt/medialibrary/mlbasemodel.cpp
Changes:
=====================================
modules/gui/qt/medialibrary/mlbasemodel.cpp
=====================================
@@ -257,14 +257,14 @@ MLItemId MLBaseModel::parentId() const
void MLBaseModel::setParentId(MLItemId parentId)
{
m_parent = parentId;
- invalidateCache();
+ resetCache();
emit parentIdChanged();
}
void MLBaseModel::unsetParentId()
{
m_parent = MLItemId();
- invalidateCache();
+ resetCache();
emit parentIdChanged();
}
@@ -294,7 +294,7 @@ void MLBaseModel::setSearchPattern( const QString& pattern )
return;
m_search_pattern = patternToApply;
- invalidateCache();
+ resetCache();
}
Qt::SortOrder MLBaseModel::getSortOrder() const
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/51435362643fd52564235e80503079df33b58869
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/51435362643fd52564235e80503079df33b58869
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list