Speed up playqueue searches.

BUG: 209
This commit is contained in:
craig.p.drummond
2013-04-29 18:34:30 +00:00
committed by craig.p.drummond
parent d4e5592ca6
commit 717b280d0a
4 changed files with 9 additions and 5 deletions

View File

@@ -41,6 +41,11 @@ bool PlayQueueProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sou
return true;
}
// Why is this sometimes called with a parent row???
if (-1!=sourceParent.row()) {
return false;
}
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
return matchesFilter(*static_cast<Song *>(index.internalPointer()));
}