mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-25 10:19:41 +01:00
* Fixed default flat collection view sorting.
This commit is contained in:
parent
a6944c49ae
commit
2d66feb5b2
@ -33,9 +33,6 @@ CollectionView::CollectionView( QWidget* parent )
|
||||
{
|
||||
setProxyModel( new CollectionProxyModel( this ) );
|
||||
|
||||
setSortingEnabled( true );
|
||||
sortByColumn( 0, Qt::AscendingOrder );
|
||||
|
||||
setDragDropMode( QAbstractItemView::DragOnly );
|
||||
setAcceptDrops( false );
|
||||
}
|
||||
@ -65,9 +62,7 @@ CollectionView::setTrackModel( TrackModel* model )
|
||||
setColumnHidden( TrackModel::Origin, true ); // Hide origin column per default
|
||||
|
||||
setGuid( QString( "collectionview/%1" ).arg( model->columnCount() ) );
|
||||
|
||||
setSortingEnabled( true );
|
||||
sortByColumn( 0, Qt::AscendingOrder );
|
||||
sortByColumn( TrackModel::Artist, Qt::AscendingOrder );
|
||||
|
||||
connect( model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||
}
|
||||
|
@ -81,8 +81,9 @@ TrackHeader::checkState()
|
||||
if ( !state.isEmpty() )
|
||||
{
|
||||
restoreState( state );
|
||||
setSortIndicatorShown( true );
|
||||
setSortIndicator( -1, Qt::AscendingOrder );
|
||||
|
||||
if ( m_parent->guid().startsWith( "playlistview" ) ) // HACK
|
||||
setSortIndicator( -1, Qt::AscendingOrder );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -449,6 +449,9 @@ TrackView::updateHoverIndex( const QPoint& pos )
|
||||
repaint();
|
||||
}
|
||||
|
||||
if ( m_model->style() == TrackModel::Short )
|
||||
return;
|
||||
|
||||
if ( idx.column() == TrackModel::Artist || idx.column() == TrackModel::Album )
|
||||
{
|
||||
if ( pos.x() > header()->sectionViewportPosition( idx.column() ) + header()->sectionSize( idx.column() ) - 16 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user