1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

* Find sibling items within same parent node in PlaylistInterface.

This commit is contained in:
Christian Muehlhaeuser
2014-09-24 04:47:36 +02:00
parent 6060d3c6af
commit 78907f06eb

View File

@@ -218,7 +218,7 @@ PlayableProxyModelPlaylistInterface::siblingIndex( int itemsAway, qint64 rootInd
idx = proxyModel->mapFromSource( pitem->index ); 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() ); 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; return -1;