mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
Emit trackCountChanged when dropping tracks in a playlist. Handle Qt/Mac bug where drops from outside the app are Qt::MoveAction not Qt::CopyAction
This commit is contained in:
@@ -420,8 +420,18 @@ PlaylistModel::parsedDroppedTracks( QList< query_ptr > tracks )
|
|||||||
}
|
}
|
||||||
emit endInsertRows();
|
emit endInsertRows();
|
||||||
|
|
||||||
if ( m_dropStorage.action == Qt::CopyAction )
|
// Work around Qt-on-mac bug where drags from outside the app are Qt::MoveAction
|
||||||
|
// instead of Qt::CopyAction
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
if ( m_dropStorage.action & Qt::CopyAction || m_dropStorage.action & Qt::MoveAction )
|
||||||
|
#else
|
||||||
|
if ( m_dropStorage.action & Qt::CopyAction )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
onPlaylistChanged( true );
|
onPlaylistChanged( true );
|
||||||
|
emit trackCountChanged( rowCount( QModelIndex() ) );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dropStorage.parent = QPersistentModelIndex();
|
m_dropStorage.parent = QPersistentModelIndex();
|
||||||
|
Reference in New Issue
Block a user