[GRASS-SVN] r42613 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 20 18:03:26 EDT 2010
Author: martinl
Date: 2010-06-20 22:03:26 +0000 (Sun, 20 Jun 2010)
New Revision: 42613
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: don't fail on empty map when saving display
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2010-06-20 21:03:32 UTC (rev 42612)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2010-06-20 22:03:26 UTC (rev 42613)
@@ -1171,7 +1171,13 @@
ltype = [{ 'ext' : 'ppm', 'type' : -1 },
{ 'ext' : 'tif', 'type' : wx.BITMAP_TYPE_TIF }]
else:
- filetype, ltype = gdialogs.GetImageHandlers(self.MapWindow.img)
+ img = self.MapWindow.img
+ if not img:
+ gcmd.GMessage(parent = self,
+ message = _("Nothing to render (empty map). Operation canceled."),
+ msgType = 'info')
+ return
+ filetype, ltype = gdialogs.GetImageHandlers(img)
# get size
dlg = gdialogs.ImageSizeDialog(self)
More information about the grass-commit
mailing list