mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
Only run the loop until the condition changes
This commit is contained in:
@@ -189,7 +189,7 @@ PlayableProxyModel::visibilityFilterAcceptsRow( int sourceRow, const QModelIndex
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
int items = 0;
|
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 ) )
|
if ( dupeFilterAcceptsRow( i, sourceParent ) && nameFilterAcceptsRow( i, sourceParent ) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user