1
0
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:
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->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;