[GRASS-SVN] r59098 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 19 21:08:29 PST 2014
Author: annakrat
Date: 2014-02-19 21:08:29 -0800 (Wed, 19 Feb 2014)
New Revision: 59098
Modified:
grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix error when saving empty map display to graphic file
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2014-02-20 01:27:01 UTC (rev 59097)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2014-02-20 05:08:29 UTC (rev 59098)
@@ -552,6 +552,8 @@
"""!Save map to image
"""
filetype, ltype = self._prepareSaveToFile()
+ if not ltype:
+ return
# get size
dlg = ImageSizeDialog(self)
@@ -591,6 +593,8 @@
Command is expected to be validated by parser.
"""
filetype, ltype = self._prepareSaveToFile()
+ if not ltype:
+ return
width, height = self.MapWindow.GetClientSize()
for param in command[1:]:
p, val = param.split('=')
@@ -640,7 +644,7 @@
if not img:
GMessage(parent = self,
message = _("Nothing to render (empty map). Operation canceled."))
- return
+ return None, None
filetype, ltype = GetImageHandlers(img)
return filetype, ltype
More information about the grass-commit
mailing list