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
1 changed files with 2 additions and 1 deletions

View File

@ -488,7 +488,8 @@ void PlaylistView::leaveEvent(QEvent* e) {
void PlaylistView::mousePressEvent(QMouseEvent* event) {
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
double new_rating = RatingItemDelegate::RatingForPos(
event->pos(), visualRect(index));