[Kst] branches/work/kst/portto4/kst/src/libkstapp

Adam Treat treat at kde.org
Fri Aug 31 01:15:10 CEST 2007


SVN commit 706638 by treat:

* Only left button for creation of items


 M  +3 -1      view.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #706637:706638
@@ -123,6 +123,7 @@
   case QEvent::GraphicsSceneMousePress:
     {
       QGraphicsSceneMouseEvent *e = static_cast<QGraphicsSceneMouseEvent*>(event);
+      if (e->button() != Qt::LeftButton) break;
       _creationPolygonPress << snapPoint(e->buttonDownScenePos(Qt::LeftButton));
       emit creationPolygonChanged(MousePress);
       return true; //filter this otherwise something can grab our mouse...
@@ -130,7 +131,8 @@
   case QEvent::GraphicsSceneMouseRelease:
     {
       QGraphicsSceneMouseEvent *e = static_cast<QGraphicsSceneMouseEvent*>(event);
-      _creationPolygonRelease << snapPoint(e->scenePos());
+      if (e->button() != Qt::LeftButton) break;
+      _creationPolygonRelease << snapPoint(e->buttonDownScenePos(Qt::LeftButton));
       emit creationPolygonChanged(MouseRelease);
       break;
     }


More information about the Kst mailing list