diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-05-06 03:57:04 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-05-06 03:57:04 (GMT) |
commit | d5da0a7254936f96e9382730e48ca336bd3d7217 (patch) | |
tree | d4bab2b0f658157daf2bc302ab6a8d8e6797362b /mapview.py | |
parent | a5635666753a3ac266664c9dd85f812f50d81cff (diff) |
Add save/restore context commands to isolate different drawings
No real change, is only to avoid future problems.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'mapview.py')
-rw-r--r-- | mapview.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -134,6 +134,7 @@ class TopMapView(gtk.DrawingArea): def expose(self, widget, event): rect = self.get_allocation() ctx = widget.window.cairo_create() + ctx.save() # set a clip region for the expose event ctx.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) @@ -142,6 +143,7 @@ class TopMapView(gtk.DrawingArea): 'show_position': self._show_position} draw(ctx, self._game_map, view_data) + ctx.restore() return False |