Improve mouse button detection for mouse release events
[quassel.git] / src / qtui / chatscene.cpp
index 867561b..60f3f1b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -653,7 +653,7 @@ void ChatScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) {
 }
 
 void ChatScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
-  if(!event->buttons() & Qt::LeftButton) {
+  if(event->button() == Qt::LeftButton && _leftButtonPressed) {
     _leftButtonPressed = false;
     if(_clickMode != NoClick) {
       if(_clickMode == SingleClick)