mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Find sibling items within same parent node in PlaylistInterface.
This commit is contained in:
parent
6060d3c6af
commit
78907f06eb
@ -218,7 +218,7 @@ PlayableProxyModelPlaylistInterface::siblingIndex( int itemsAway, qint64 rootInd
|
||||
idx = proxyModel->mapFromSource( pitem->index );
|
||||
}
|
||||
|
||||
idx = proxyModel->index( idx.row() + itemsAway, 0 );
|
||||
idx = proxyModel->index( idx.row() + itemsAway, 0, idx.parent() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -246,7 +246,7 @@ PlayableProxyModelPlaylistInterface::siblingIndex( int itemsAway, qint64 rootInd
|
||||
return (qint64)( item->index.internalPointer() );
|
||||
}
|
||||
|
||||
idx = proxyModel->index( idx.row() + ( itemsAway > 0 ? 1 : -1 ), 0 );
|
||||
idx = proxyModel->index( idx.row() + ( itemsAway > 0 ? 1 : -1 ), 0, idx.parent() );
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user