From: <jb...@us...> - 2009-11-16 10:01:13
|
Revision: 387 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=387&view=rev Author: jblance Date: 2009-11-16 10:01:05 +0000 (Mon, 16 Nov 2009) Log Message: ----------- Fix for multiple graphs bug v2 including heartrate pie graph fix Modified Paths: -------------- pytrainer/trunk/pytrainer/gui/drawArea.py Modified: pytrainer/trunk/pytrainer/gui/drawArea.py =================================================================== --- pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-16 09:58:59 UTC (rev 386) +++ pytrainer/trunk/pytrainer/gui/drawArea.py 2009-11-16 10:01:05 UTC (rev 387) @@ -168,9 +168,12 @@ def drawPie(self,xvalues,yvalues,xlabel,ylabel,title,color,zones=None): logging.debug('>>') + vboxChildren = self.vbox.get_children() + logging.debug('Vbox has %d children %s' % (len(vboxChildren), str(vboxChildren) )) # ToDo: check why vertical container is shared - for child in self.vbox.get_children(): - if self.vbox.get_children()[0] != child: + for child in vboxChildren: + #Remove all FigureCanvasGTK and NavigationToolbar2GTKAgg to stop double ups of graphs + if isinstance(child, matplotlib.backends.backend_gtkagg.FigureCanvasGTK) or isinstance(child, matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): logging.debug('Removing child: '+str(child)) self.vbox.remove(child) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |