mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +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() )
|
if ( !model() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( event->key() == Qt::Key_Delete )
|
if ( event->key() == Qt::Key_Delete && !model()->isReadOnly() )
|
||||||
{
|
{
|
||||||
qDebug() << "Removing selected items";
|
qDebug() << "Removing selected items";
|
||||||
proxyModel()->removeIndexes( selectedIndexes() );
|
proxyModel()->removeIndexes( selectedIndexes() );
|
||||||
|
Reference in New Issue
Block a user