[GRASS-SVN] r67346 - grass/branches/releasebranch_7_0/gui/wxpython/timeline
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Dec 23 10:53:13 PST 2015
Author: annakrat
Date: 2015-12-23 10:53:13 -0800 (Wed, 23 Dec 2015)
New Revision: 67346
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py
Log:
wxGUI/timeline: merge recent changes (r67069, r67324, r67325) in #2824
Modified: grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py 2015-12-23 16:26:08 UTC (rev 67345)
+++ grass/branches/releasebranch_7_0/gui/wxpython/timeline/frame.py 2015-12-23 18:53:13 UTC (rev 67346)
@@ -204,8 +204,9 @@
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)
@@ -231,8 +232,6 @@
self.axes3d.grid(False)
# self.axes3d.grid(True)
if self.temporalType == 'absolute':
- if check_version(1, 1, 0):
- self.axes3d.zaxis_date()
convert = mdates.date2num
else:
convert = lambda x: x
@@ -267,6 +266,9 @@
self.axes3d.set_xlabel(_("X"))
self.axes3d.set_ylabel(_("Y"))
+ if self.temporalType == 'absolute':
+ if check_version(1, 1, 0):
+ self.axes3d.zaxis_date()
self.axes3d.set_zlabel(_('Time'))
self.axes3d.mouse_init()
self.canvas.draw()
@@ -276,8 +278,6 @@
self.axes2d.clear()
self.axes2d.grid(True)
if self.temporalType == 'absolute':
- self.axes2d.xaxis_date()
- self.fig.autofmt_xdate()
convert = mdates.date2num
else:
convert = lambda x: x
@@ -319,7 +319,8 @@
marker='o', linestyle='None', color=color)[0])
if self.temporalType == 'absolute':
- pass
+ self.axes2d.xaxis_date()
+ self.fig.autofmt_xdate()
# self.axes2d.set_xlabel(_("Time"))
else:
self.axes2d.set_xlabel(_("Time [%s]") % self.unit)
@@ -344,8 +345,8 @@
datasets = datasets.split(',')
try:
datasets = self._checkDatasets(datasets)
- except GException:
- GError(parent=self, message=_("Invalid input data"))
+ except GException, e:
+ GError(parent=self, message=unicode(e), showTraceback=False)
return
self.datasets = datasets
@@ -436,8 +437,8 @@
return
try:
datasets = self._checkDatasets(datasets)
- except GException:
- GError(parent=self, message=_("Invalid input data"))
+ except GException, e:
+ GError(parent=self, message=unicode(e), showTraceback=False)
return
self.datasets = datasets
self.datasetSelect.SetValue(','.join(map(lambda x: x[0] + '@' + x[1], datasets)))
More information about the grass-commit
mailing list