mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Don't expand LovedTracksItem.
This commit is contained in:
@@ -649,7 +649,7 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
|
|||||||
setDirtyRegion( m_dropRect );
|
setDirtyRegion( m_dropRect );
|
||||||
const QPoint pos = event->pos();
|
const QPoint pos = event->pos();
|
||||||
const QModelIndex index = indexAt( pos );
|
const QModelIndex index = indexAt( pos );
|
||||||
dataChanged(m_dropIndex, m_dropIndex);
|
dataChanged( m_dropIndex, m_dropIndex );
|
||||||
m_dropIndex = QPersistentModelIndex( index );
|
m_dropIndex = QPersistentModelIndex( index );
|
||||||
|
|
||||||
if ( index.isValid() )
|
if ( index.isValid() )
|
||||||
@@ -658,12 +658,23 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
|
|||||||
m_dropRect = rect;
|
m_dropRect = rect;
|
||||||
|
|
||||||
SourceTreeItem* item = itemFromIndex< SourceTreeItem >( index );
|
SourceTreeItem* item = itemFromIndex< SourceTreeItem >( index );
|
||||||
|
|
||||||
if ( item->willAcceptDrag( event->mimeData() ) )
|
if ( item->willAcceptDrag( event->mimeData() ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
accept = true;
|
accept = true;
|
||||||
m_delegate->hovered( index, event->mimeData() );
|
|
||||||
dataChanged(index, index);
|
switch ( model()->data( index, SourcesModel::SourceTreeItemTypeRole ).toInt() )
|
||||||
|
{
|
||||||
|
case SourcesModel::StaticPlaylist:
|
||||||
|
case SourcesModel::CategoryAdd:
|
||||||
|
m_delegate->hovered( index, event->mimeData() );
|
||||||
|
dataChanged( index, index );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_delegate->hovered( QModelIndex(), 0 );
|
m_delegate->hovered( QModelIndex(), 0 );
|
||||||
|
Reference in New Issue
Block a user