mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Don't get stuck searching for another item if the TreeModel is empty.
This commit is contained in:
parent
56cb000130
commit
2f5ebd2071
@ -329,9 +329,9 @@ TreeProxyModel::siblingItem( int itemsAway )
|
||||
Tomahawk::result_ptr
|
||||
TreeProxyModel::siblingItem( int itemsAway, bool readOnly )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
QModelIndex idx = currentIndex();
|
||||
if ( !idx.isValid() )
|
||||
return Tomahawk::result_ptr();
|
||||
|
||||
if ( m_shuffled )
|
||||
idx = index( qrand() % rowCount( idx.parent() ), 0, idx.parent() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user