[GRASS-SVN] r52476 - grass/branches/develbranch_6/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 29 23:55:35 PDT 2012
Author: annakrat
Date: 2012-07-29 23:55:35 -0700 (Sun, 29 Jul 2012)
New Revision: 52476
Modified:
grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI: delete unused wx.Image instances when rendering (merge from trunk, r52436)
Modified: grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py 2012-07-30 03:12:45 UTC (rev 52475)
+++ grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py 2012-07-30 06:55:35 UTC (rev 52476)
@@ -496,6 +496,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)
@@ -516,6 +521,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