|
From: <wea...@us...> - 2010-07-25 22:24:11
|
Revision: 8575
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8575&view=rev
Author: weathergod
Date: 2010-07-25 22:24:05 +0000 (Sun, 25 Jul 2010)
Log Message:
-----------
Fix "graph jumping" issue when rubber-banding a selection in GTK backends.
Modified Paths:
--------------
branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py
Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010-07-24 22:02:33 UTC (rev 8574)
+++ branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010-07-25 22:24:05 UTC (rev 8575)
@@ -616,7 +616,7 @@
self.canvas.window.set_cursor(cursord[cursor])
def release(self, event):
- try: del self._imageBack
+ try: del self._pixmapBack
except AttributeError: pass
def dynamic_update(self):
@@ -640,7 +640,7 @@
rect = [int(val)for val in min(x0,x1), min(y0, y1), w, h]
try:
- lastrect, imageBack = self._imageBack
+ lastrect, pixmapBack = self._pixmapBack
except AttributeError:
#snap image back
if event.inaxes is None:
@@ -650,9 +650,10 @@
l,b,w,h = [int(val) for val in ax.bbox.bounds]
b = int(height)-(b+h)
axrect = l,b,w,h
- self._imageBack = axrect, drawable.get_image(*axrect)
+ self._pixmapBack = axrect, gtk.gdk.Pixmap(drawable, w, h)
+ self._pixmapBack[1].draw_drawable(gc, drawable, l, b, 0, 0, w, h)
else:
- drawable.draw_image(gc, imageBack, 0, 0, *lastrect)
+ drawable.draw_drawable(gc, pixmapBack, 0, 0, *lastrect)
drawable.draw_rectangle(gc, False, *rect)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|