1
0
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:
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() )
return;
if ( event->key() == Qt::Key_Delete )
if ( event->key() == Qt::Key_Delete && !model()->isReadOnly() )
{
qDebug() << "Removing selected items";
proxyModel()->removeIndexes( selectedIndexes() );