From 5b51e281d3c555624d705c9976663d17ea771c97 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 4 May 2016 09:36:05 -0300 Subject: [PATCH] Fix warnings between double <-> int conversion --- src/app/ui/editor/pixels_movement.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/ui/editor/pixels_movement.cpp b/src/app/ui/editor/pixels_movement.cpp index f6d4989f9..018be3bdd 100644 --- a/src/app/ui/editor/pixels_movement.cpp +++ b/src/app/ui/editor/pixels_movement.cpp @@ -328,10 +328,10 @@ void PixelsMovement::moveImage(const gfx::Point& pos, MoveModifier moveModifier) h = 1.0; } - a.x = (a.x-pivot.x)*(1.0+dx/w) + pivot.x; - a.y = (a.y-pivot.y)*(1.0+dy/h) + pivot.y; - b.x = (b.x-pivot.x)*(1.0+dx/w) + pivot.x; - b.y = (b.y-pivot.y)*(1.0+dy/h) + pivot.y; + a.x = int((a.x-pivot.x)*(1.0+dx/w) + pivot.x); + a.y = int((a.y-pivot.y)*(1.0+dy/h) + pivot.y); + b.x = int((b.x-pivot.x)*(1.0+dx/w) + pivot.x); + b.y = int((b.y-pivot.y)*(1.0+dy/h) + pivot.y); } // Do not use "gfx::Rect(a, b)" here because if a > b we want to