1
0
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:
Leo Franchi
2011-05-06 07:43:12 -04:00
parent 5f67b3453b
commit aaebdc6a4b

View File

@@ -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() );