Commit 2310a193 authored by Ralf Engels's avatar Ralf Engels
Browse files

Fix: add track to playlist by double click on arrow in the collection

BUG: 279513
FIXED-IN: 2.8
parent 9b3082f9
......@@ -345,17 +345,22 @@ CollectionTreeView::mouseDoubleClickEvent( QMouseEvent *event )
return;
}
bool isExpandable = model()->hasChildren( index );
bool wouldExpand = isExpandable && !KGlobalSettings::singleClick(); // we're in doubleClick
if( event->button() == Qt::LeftButton &&
// that was a double click on the item itself or the expander clicked? (BR: 279513)
bool reverse = isRightToLeft();
QRect rect = visualRect( index );
if( KGlobalSettings::singleClick() &&
event->button() == Qt::LeftButton &&
event->modifiers() == Qt::NoModifier &&
!wouldExpand )
( ( reverse && event->pos().x() < rect.right() ) ||
( !reverse && event->pos().x() > rect.left() ) ) )
{
CollectionTreeItem *item = getItemFromIndex( index );
playChildTracks( item, Playlist::AppendAndPlay );
event->accept();
return;
}
Amarok::PrettyTreeView::mouseDoubleClickEvent( event );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment