removed the ability for rating using the mouse right button

This commit is contained in:
Luis Ángel San Martín 2014-06-04 21:17:59 +02:00
parent 4e7367198b
commit cd4c86a80c

View File

@ -399,6 +399,8 @@ void StarEditor::leaveEvent(QEvent * event){
void StarEditor::mousePressEvent(QMouseEvent * event ) void StarEditor::mousePressEvent(QMouseEvent * event )
{ {
if(event->button() == Qt::LeftButton)
{
int star = starAtPosition(event->x()); int star = starAtPosition(event->x());
if (star != myStarRating.starCount() && star != -1) { if (star != myStarRating.starCount() && star != -1) {
@ -406,8 +408,7 @@ void StarEditor::mousePressEvent(QMouseEvent * event )
shouldCommitData = true; shouldCommitData = true;
emit commitData(); emit commitData();
} }
}
} }
int StarEditor::starAtPosition(int x) int StarEditor::starAtPosition(int x)