1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 02:46:57 +01:00

Only react to *left* mouse clicks on the ratings column

This commit is contained in:
David Sansome 2010-10-17 22:35:52 +00:00
parent bcddb2317a
commit acd9b2e136

View File

@ -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));