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:
@@ -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 )
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user