[GRASS-SVN] r52436 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 23 04:56:07 PDT 2012
Author: annakrat
Date: 2012-07-23 04:56:06 -0700 (Mon, 23 Jul 2012)
New Revision: 52436
Modified:
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI: delete unused wx.Image instances when rendering
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-07-21 17:53:04 UTC (rev 52435)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-07-23 11:56:06 UTC (rev 52436)
@@ -529,6 +529,11 @@
if overlay.mapfile is not None \
and os.path.isfile(overlay.mapfile) and os.path.getsize(overlay.mapfile):
img = wx.Image(overlay.mapfile, wx.BITMAP_TYPE_ANY)
+
+ for key in self.imagedict.keys():
+ if self.imagedict[key]['id'] == overlay.id:
+ del self.imagedict[key]
+
self.imagedict[img] = { 'id' : overlay.id,
'layer' : overlay }
imgs.append(img)
@@ -549,6 +554,10 @@
else:
img = None
+ for key in self.imagedict.keys():
+ if self.imagedict[key]['id'] == imgId:
+ del self.imagedict[key]
+
self.imagedict[img] = { 'id': imgId }
return img
More information about the grass-commit
mailing list