summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-01-18 19:32:38 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-01-18 19:32:38 +0000
commitb4c830b6ac7d70e9d5374a45087198b9b4fd12f1 (patch)
treeb16471e85472d693e6f33eea6d4b135e495727b4 /src/display
parentMade the inside/outside radio buttons in the Spirograph extension inx transla... (diff)
downloadinkscape-b4c830b6ac7d70e9d5374a45087198b9b4fd12f1.tar.gz
inkscape-b4c830b6ac7d70e9d5374a45087198b9b4fd12f1.zip
Partially fix bug #167500 (rulers being off)
(bzr r4557)
Diffstat (limited to 'src/display')
-rw-r--r--src/display/sp-canvas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 6fca902ce..2033f8a69 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -2092,8 +2092,8 @@ sp_canvas_scroll_to (SPCanvas *canvas, double cx, double cy, unsigned int clear,
g_return_if_fail (canvas != NULL);
g_return_if_fail (SP_IS_CANVAS (canvas));
- int ix = (int) (cx + 0.5);
- int iy = (int) (cy + 0.5);
+ int ix = (int) round(cx); //cx might be negative, so (int)(cx + 0.5) will not do!
+ int iy = (int) round(cy);
int dx = ix - canvas->x0;
int dy = iy - canvas->y0;