mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
Sort playlists above stations
and the + items last
This commit is contained in:
parent
234fdf07ba
commit
d0e50a73f0
@ -132,6 +132,12 @@ CategoryAddItem::dropMimeData( const QMimeData* data, Qt::DropAction action )
|
||||
return false;
|
||||
}
|
||||
|
||||
int
|
||||
CategoryAddItem::peerSortValue() const
|
||||
{
|
||||
return INT_MAX; // after any siblings
|
||||
}
|
||||
|
||||
|
||||
/// CategoryItem
|
||||
|
||||
@ -173,9 +179,9 @@ int
|
||||
CategoryItem::peerSortValue() const
|
||||
{
|
||||
if( m_category == SourcesModel::PlaylistsCategory )
|
||||
return 100;
|
||||
else if( m_category == SourcesModel::StationsCategory )
|
||||
return -100;
|
||||
else if( m_category == SourcesModel::StationsCategory )
|
||||
return 100;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
virtual QString text() const;
|
||||
virtual void activate();
|
||||
virtual QIcon icon() const;
|
||||
virtual int peerSortValue() const;
|
||||
|
||||
virtual bool willAcceptDrag(const QMimeData* data) const;
|
||||
virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action);
|
||||
|
Loading…
x
Reference in New Issue
Block a user