Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mapview.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-05-06 03:57:04 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-05-06 03:57:04 (GMT)
commitd5da0a7254936f96e9382730e48ca336bd3d7217 (patch)
treed4bab2b0f658157daf2bc302ab6a8d8e6797362b /mapview.py
parenta5635666753a3ac266664c9dd85f812f50d81cff (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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mapview.py b/mapview.py
index fff37a4..cf443c9 100644
--- a/mapview.py
+++ b/mapview.py
@@ -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