[GRASS-SVN] r60052 - grass/trunk/gui/wxpython/timeline

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 2 19:48:05 PDT 2014


Author: annakrat
Date: 2014-05-02 19:48:05 -0700 (Fri, 02 May 2014)
New Revision: 60052

Modified:
   grass/trunk/gui/wxpython/timeline/frame.py
Log:
wxGUI/timeline: fix #2275 - search path

Modified: grass/trunk/gui/wxpython/timeline/frame.py
===================================================================
--- grass/trunk/gui/wxpython/timeline/frame.py	2014-05-02 23:47:52 UTC (rev 60051)
+++ grass/trunk/gui/wxpython/timeline/frame.py	2014-05-03 02:48:05 UTC (rev 60052)
@@ -344,6 +344,8 @@
         datasets = datasets.split(',')
         try:
             datasets = self._checkDatasets(datasets)
+            if not datasets:
+                return
         except GException:
             GError(parent=self, message=_("Invalid input data"))
             return
@@ -395,6 +397,8 @@
         # flatten this list
         if allDatasets:
             allDatasets = reduce(lambda x, y: x + y, reduce(lambda x, y: x + y, allDatasets))
+            mapsets = tgis.get_tgis_c_library_interface().available_mapsets()
+            allDatasets = [i for i in sorted(allDatasets, key=lambda l: mapsets.index(l[1]))]
 
         for dataset in datasets:
             errorMsg = _("Space time dataset <%s> not found.") % dataset
@@ -420,6 +424,8 @@
                 if dlg.ShowModal() == wx.ID_OK:
                     index = dlg.GetSelection()
                     validated.append(allDatasets[indices[index]])
+                else:
+                    continue
             else:
                 validated.append(allDatasets[indices[0]])
 
@@ -436,6 +442,8 @@
             return
         try:
             datasets = self._checkDatasets(datasets)
+            if not datasets:
+                return
         except GException:
             GError(parent=self, message=_("Invalid input data"))
             return



More information about the grass-commit mailing list