From 071719e0a4ec51adf9b2ba2cd561671b6a20e9b1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 8 Sep 2006 11:31:11 +0200 Subject: [PATCH] Do not sum up multiple translations --- sugar/canvas/GridLayout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sugar/canvas/GridLayout.py b/sugar/canvas/GridLayout.py index cfd4bb22..b61a1853 100644 --- a/sugar/canvas/GridLayout.py +++ b/sugar/canvas/GridLayout.py @@ -1,3 +1,4 @@ +import cairo import gobject import goocanvas @@ -80,7 +81,9 @@ class GridGroup(goocanvas.Group): def _update_position(self): if self._x != 0 or self._y != 0: - self.translate(self._x, self._y) + matrix = cairo.Matrix(1, 0, 0, 1, 0, 0) + matrix.translate(self._x, self._y) + self.set_transform(matrix) def do_set_property(self, pspec, value): if pspec.name == 'width':