1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-31 06:02:27 +02:00

* Don't expand LovedTracksItem.

This commit is contained in:
Christian Muehlhaeuser 2012-06-26 03:33:35 +02:00
parent 5bd616e59d
commit fa52f8a75c

View File

@ -649,7 +649,7 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
setDirtyRegion( m_dropRect );
const QPoint pos = event->pos();
const QModelIndex index = indexAt( pos );
dataChanged(m_dropIndex, m_dropIndex);
dataChanged( m_dropIndex, m_dropIndex );
m_dropIndex = QPersistentModelIndex( index );
if ( index.isValid() )
@ -658,12 +658,23 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
m_dropRect = rect;
SourceTreeItem* item = itemFromIndex< SourceTreeItem >( index );
if ( item->willAcceptDrag( event->mimeData() ) )
{
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
m_delegate->hovered( QModelIndex(), 0 );