[GRASS-SVN] r42614 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 20 18:05:58 EDT 2010
Author: martinl
Date: 2010-06-20 22:05:58 +0000 (Sun, 20 Jun 2010)
New Revision: 42614
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: don't fail on empty map when saving display
(merge r42613 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-06-20 22:03:26 UTC (rev 42613)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-06-20 22:05:58 UTC (rev 42614)
@@ -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