Sfoglia il codice sorgente

g.gui.timeline: show better error when dataset is empty

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67325 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 anni fa
parent
commit
0fd1ac1a01
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      gui/wxpython/timeline/frame.py

+ 3 - 2
gui/wxpython/timeline/frame.py

@@ -204,8 +204,9 @@ class TimelineFrame(wx.Frame):
 
             rows = sp.get_registered_maps(columns=columns, where=None,
                                           order='start_time', dbif=self.dbif)
-            if rows is None:
-                rows = []
+            if not rows:
+                GError(parent=self, message=_("Dataset <{name}> is empty").format(name=series[0] + '@' + series[1]))
+                return
             for row in rows:
                 mapName, start, end, north, south, west, east = row
                 self.timeData[name]['start_datetime'].append(start)