Revision: 6772
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6772&view=rev
Author: jdh2358
Date: 2009-01-10 20:05:24 +0000 (Sat, 10 Jan 2009)
Log Message:
-----------
michiel's backend qt draw idle patch - sf id 2468809
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-10 20:03:59 UTC (rev 6771)
+++ trunk/matplotlib/CHANGELOG 2009-01-10 20:05:24 UTC (rev 6772)
@@ -1,5 +1,6 @@
-2009-01-10 Applied Michiel's hatch patch for macosx backend. Closes
- sf patch 2497785 - JDH
+2009-01-10 Applied Michiel's hatch patch for macosx backend and
+ draw_idle patch for qt. Closes sf patched 2497785 and
+ 2468809 - JDH
2009-01-06 Fix bug in setting of dashed negative contours. - EF
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2009-01-10
20:03:59 UTC (rev 6771)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2009-01-10
20:05:24 UTC (rev 6772)
@@ -37,7 +37,7 @@
if matplotlib.is_interactive():
figManager = Gcf.get_active()
if figManager != None:
- figManager.canvas.draw()
+ figManager.canvas.draw_idle()
def _create_qApp():
"""
@@ -97,6 +97,7 @@
FigureCanvasBase.__init__( self, figure )
self.figure = figure
self.setMouseTracking( True )
+ self._idle = True
# hide until we can test and fix
#self.startTimer(backend_IdleEvent.milliseconds)
w,h = self.get_width_height()
@@ -198,6 +199,15 @@
FigureCanvasBase.stop_event_loop_default(self)
stop_event_loop.__doc__=FigureCanvasBase.stop_event_loop_default.__doc__
+ def draw_idle(self):
+ 'update drawing area only if idle'
+ d = self._idle
+ self._idle = False
+ def idle_draw(*args):
+ self.draw()
+ self._idle = True
+ if d: QtCore.QTimer.singleShot(0, idle_draw)
+
class FigureManagerQT( FigureManagerBase ):
"""
Public attributes
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins