mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Only react to *left* mouse clicks on the ratings column
This commit is contained in:
parent
bcddb2317a
commit
acd9b2e136
@ -488,7 +488,8 @@ void PlaylistView::leaveEvent(QEvent* e) {
|
|||||||
|
|
||||||
void PlaylistView::mousePressEvent(QMouseEvent* event) {
|
void PlaylistView::mousePressEvent(QMouseEvent* event) {
|
||||||
QModelIndex index = indexAt(event->pos());
|
QModelIndex index = indexAt(event->pos());
|
||||||
if (index.isValid() && index.data(Playlist::Role_CanSetRating).toBool()) {
|
if (event->button() == Qt::LeftButton && index.isValid() &&
|
||||||
|
index.data(Playlist::Role_CanSetRating).toBool()) {
|
||||||
// Calculate which star was clicked
|
// Calculate which star was clicked
|
||||||
double new_rating = RatingItemDelegate::RatingForPos(
|
double new_rating = RatingItemDelegate::RatingForPos(
|
||||||
event->pos(), visualRect(index));
|
event->pos(), visualRect(index));
|
||||||
|
Loading…
Reference in New Issue
Block a user