mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Don't let users edit readonly playlists with Delete key
This commit is contained in:
@@ -133,7 +133,7 @@ PlaylistView::keyPressEvent( QKeyEvent* event )
|
||||
if ( !model() )
|
||||
return;
|
||||
|
||||
if ( event->key() == Qt::Key_Delete )
|
||||
if ( event->key() == Qt::Key_Delete && !model()->isReadOnly() )
|
||||
{
|
||||
qDebug() << "Removing selected items";
|
||||
proxyModel()->removeIndexes( selectedIndexes() );
|
||||
|
Reference in New Issue
Block a user