1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-18 03:41:27 +02:00

Start playing on ENTER in artistview

BUG: TWK-204
This commit is contained in:
Michael Zanetti
2011-08-09 00:45:37 +02:00
parent d9a4b718ed
commit fb95568196
2 changed files with 15 additions and 0 deletions

View File

@@ -151,6 +151,20 @@ ArtistView::onItemActivated( const QModelIndex& index )
}
}
void
ArtistView::keyPressEvent( QKeyEvent* event )
{
qDebug() << Q_FUNC_INFO;
QTreeView::keyPressEvent( event );
if ( !model() )
return;
if ( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return )
{
onItemActivated( currentIndex() );
}
}
void
ArtistView::paintEvent( QPaintEvent* event )

View File

@@ -74,6 +74,7 @@ protected:
virtual void resizeEvent( QResizeEvent* event );
void paintEvent( QPaintEvent* event );
void keyPressEvent( QKeyEvent* event );
private slots:
void onFilterChanged( const QString& filter );