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

Adam Treat treat at kde.org
Thu Jun 7 23:16:24 CEST 2007


SVN commit 672694 by treat:

* Fix the boundingRect for label items
* Don't grab the mouse in creation mode


 M  +1 -1      labelitem.cpp  
 M  +3 -1      view.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/labelitem.cpp #672693:672694
@@ -44,7 +44,7 @@
     QFont font;
     font.setPointSize(16);
     QFontMetrics fm(font);
-    painter->translate(QPoint(box.x(), box.y() + fm.height()));
+    painter->translate(QPoint(box.x(), box.y() + fm.ascent()));
     Label::RenderContext rc(font.family(), font.pointSize(), painter);
     Label::renderLabel(rc, _parsed->chunk);
 
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #672693:672694
@@ -111,8 +111,10 @@
         QGraphicsSceneMouseEvent *e = static_cast<QGraphicsSceneMouseEvent*>(event);
         _creationPolygonPress << e->buttonDownScenePos(Qt::LeftButton);
         emit creationPolygonChanged(MousePress);
+        return true; //filter this otherwise something can grab our mouse...
+      } else {
+        return false;
       }
-      return false;
     }
   case QEvent::GraphicsSceneMouseRelease:
     {


More information about the Kst mailing list