[GRASS-SVN] r72491 - grass/branches/releasebranch_7_4/gui/wxpython/tplot

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 22 05:58:16 PDT 2018


Author: lucadelu
Date: 2018-03-22 05:58:16 -0700 (Thu, 22 Mar 2018)
New Revision: 72491

Modified:
   grass/branches/releasebranch_7_4/gui/wxpython/tplot/frame.py
Log:
g.gui.tplot: fixed small bugs

Modified: grass/branches/releasebranch_7_4/gui/wxpython/tplot/frame.py
===================================================================
--- grass/branches/releasebranch_7_4/gui/wxpython/tplot/frame.py	2018-03-22 12:54:21 UTC (rev 72490)
+++ grass/branches/releasebranch_7_4/gui/wxpython/tplot/frame.py	2018-03-22 12:58:16 UTC (rev 72491)
@@ -615,13 +615,18 @@
                             'unit', 'temporalDataType']:
                     continue
                 xdata.append(self.convert(values['start_datetime']))
-                ydata.append(values['value'])
+                if values['value'] == '':
+                    ydata.append(None)
+                else:
+                    ydata.append(values['value'])
 
             if len(ydata) == ydata.count(None):
                 GError(parent=self, showTraceback=False,
-                       message=_("Problem getting data from raster temporal"
-                                 " dataset. Empty list of values."))
-                return
+                       message=_("Problem getting data from vector temporal"
+                                 " dataset. Empty list of values for cat "
+                                 "{ca}.".format(ca=name_cat[1].replace('cat',
+                                                                       ''))))
+                continue
             self.lookUp.AddDataset(yranges=ydata, xranges=xdata,
                                    datasetName=name)
             color = self.colors.next()
@@ -662,7 +667,7 @@
 
             if len(ydata) == ydata.count(None):
                 GError(parent=self, showTraceback=False,
-                       message=_("Problem getting data from raster temporal"
+                       message=_("Problem getting data from vector temporal"
                                  " dataset. Empty list of values."))
                 return
             self.lookUp.AddDataset(yranges=ydata, xranges=xdata,



More information about the grass-commit mailing list