Re-factored the source to use the new coordinate classes
[situare] / src / map / mapscroller.cpp
index 8b8f554..30e54c6 100644 (file)
@@ -36,8 +36,10 @@ void MapScroller::updateCurrentValue(const QVariant &value)
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    Q_ASSERT(value.type() == QVariant::Point);
+    Q_ASSERT(value.type() == QVariant::PointF);
 
-    if (state() == QAbstractAnimation::Running)
-        emit coordinateUpdated(value.toPoint());
+    if (state() == QAbstractAnimation::Running) {
+        QPointF point = value.toPointF();
+        emit coordinateUpdated(SceneCoordinate(point.x(), point.y()));
+    }
 }