summaryrefslogtreecommitdiffstats
path: root/src/display/sodipodi-ctrl.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-03-09 00:48:46 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-03-09 00:48:46 +0000
commitfb2f2001d7c178059f420c1c0e62e10f93f7d3c0 (patch)
treefde97c90f5c8d31a0d3570ec51b40f8607bd17ba /src/display/sodipodi-ctrl.cpp
parentfor zero-length lines, do not request canvas redraw and do not attempt to draw (diff)
downloadinkscape-fb2f2001d7c178059f420c1c0e62e10f93f7d3c0.tar.gz
inkscape-fb2f2001d7c178059f420c1c0e62e10f93f7d3c0.zip
do not redraw if moved to the same point as before
(bzr r7449)
Diffstat (limited to 'src/display/sodipodi-ctrl.cpp')
-rw-r--r--src/display/sodipodi-ctrl.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/display/sodipodi-ctrl.cpp b/src/display/sodipodi-ctrl.cpp
index c26402743..caa5fa697 100644
--- a/src/display/sodipodi-ctrl.cpp
+++ b/src/display/sodipodi-ctrl.cpp
@@ -111,6 +111,8 @@ sp_ctrl_init (SPCtrl *ctrl)
ctrl->box.x0 = ctrl->box.y0 = ctrl->box.x1 = ctrl->box.y1 = 0;
ctrl->cache = NULL;
ctrl->pixbuf = NULL;
+
+ ctrl->_point = Geom::Point(0,0);
}
static void
@@ -550,8 +552,11 @@ sp_ctrl_render (SPCanvasItem *item, SPCanvasBuf *buf)
}
void SPCtrl::moveto (Geom::Point const p) {
- sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (this), Geom::Matrix(Geom::Translate (p)));
- _moved = true;
+ if (p != _point) {
+ sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (this), Geom::Matrix(Geom::Translate (p)));
+ _moved = true;
+ }
+ _point = p;
}