From 28e18b66a6c8f5a7d1c1540b7b51b717ab460c28 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 14 Aug 2011 01:25:54 +0200 Subject: [PATCH] * Fixed TWK-366: Don't accept drops unless we are using a backing playlist. --- src/libtomahawk/playlist/playlistmodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/playlist/playlistmodel.cpp b/src/libtomahawk/playlist/playlistmodel.cpp index 4cbe80019..e7dc1cacd 100644 --- a/src/libtomahawk/playlist/playlistmodel.cpp +++ b/src/libtomahawk/playlist/playlistmodel.cpp @@ -42,7 +42,7 @@ PlaylistModel::PlaylistModel( QObject* parent ) m_dropStorage.parent = QPersistentModelIndex(); m_dropStorage.row = -10; - setReadOnly( false ); + setReadOnly( true ); } @@ -155,7 +155,6 @@ PlaylistModel::loadHistory( const Tomahawk::source_ptr& source, unsigned int amo } m_playlist.clear(); - setReadOnly( true ); DatabaseCommand_PlaybackHistory* cmd = new DatabaseCommand_PlaybackHistory( source ); cmd->setLimit( amount ); @@ -371,10 +370,10 @@ PlaylistModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int r return true; } + void PlaylistModel::parsedDroppedTracks( QList< query_ptr > tracks ) { - if ( m_dropStorage.row == -10 ) // nope return;