]> git.sesse.net Git - kdenlive/blobdiff - src/dvdwizardmenu.h
Make sure DVD buttons have integer positions
[kdenlive] / src / dvdwizardmenu.h
index 85eea94adadc770b54b0fbfa478baf94c9139bf8..85522e72ea3f4b907dd0341a058a6747a1ae22be 100644 (file)
@@ -113,11 +113,11 @@ protected:
 
     virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) {
         if (change == ItemPositionChange && scene()) {
-            QPointF newPos = value.toPointF();
+            QPoint newPos = value.toPoint();
             QRectF sceneShape = sceneBoundingRect();
             DvdScene *sc = static_cast < DvdScene * >(scene());
-            newPos.setX(qMax(newPos.x(), (qreal)0));
-            newPos.setY(qMax(newPos.y(), (qreal)0));
+            newPos.setX(qMax(newPos.x(), 0));
+            newPos.setY(qMax(newPos.y(), 0));
             if (newPos.x() + sceneShape.width() > sc->width()) newPos.setX(sc->width() - sceneShape.width());
             if (newPos.y() + sceneShape.height() > sc->height()) newPos.setY(sc->height() - sceneShape.height());