mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
Don't let users edit readonly playlists with Delete key
This commit is contained in:
parent
5f67b3453b
commit
aaebdc6a4b
@ -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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user