mirror of
https://github.com/status-im/SortFilterProxyModel.git
synced 2025-02-22 23:58:16 +00:00
Don't filter rows until the proxy is completely initialized
This commit is contained in:
parent
6224f853f6
commit
407e596ab7
@ -141,6 +141,8 @@ QVariant QQmlSortFilterProxyModel::sourceData(const QModelIndex &sourceIndex, in
|
||||
|
||||
bool QQmlSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
|
||||
{
|
||||
if (!m_completed)
|
||||
return true;
|
||||
QModelIndex sourceIndex = sourceModel()->index(source_row, 0, source_parent);
|
||||
bool valueAccepted = !m_filterValue.isValid() || ( m_filterValue == sourceModel()->data(sourceIndex, filterRole()) );
|
||||
bool baseAcceptsRow = valueAccepted && QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user