Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Amarok
Commits
2310a193
Commit
2310a193
authored
Feb 20, 2013
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/browsers/CollectionTreeView.cpp
View file @
2310a193
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment