1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01:00

Only run the loop until the condition changes

This commit is contained in:
Uwe L. Korn 2014-10-11 19:23:06 +01:00
parent 5da1736529
commit 8eab0442f2

View File

@ -189,7 +189,7 @@ PlayableProxyModel::visibilityFilterAcceptsRow( int sourceRow, const QModelIndex
return true;
int items = 0;
for ( int i = 0; i < sourceRow; i++ )
for ( int i = 0; ( i < sourceRow ) && ( items < m_maxVisibleItems ) ; i++ )
{
if ( dupeFilterAcceptsRow( i, sourceParent ) && nameFilterAcceptsRow( i, sourceParent ) )
{