Commit 343cae29 authored by Benjamin Jakimow's avatar Benjamin Jakimow

fixed TimeSeriesFindOverlapTask

modified tooltips
added screenshot
Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow benjamin.jakimow@geo.hu-berlin.de <benjamin.jakimow@geo.hu-berlin.de>
parent 8de02395
......@@ -734,6 +734,9 @@ def gotoPreviousFeature(layer: typing.Union[QgsVectorLayer, AttributeTableWidget
nextFID = visible_features[next_index]
gotoFeature(nextFID, layer, tools, options)
s = ""
return nextFID
return None
class LabelWidget(AttributeTableWidget):
......@@ -753,12 +756,15 @@ class LabelWidget(AttributeTableWidget):
self.mActionPreviousFeature.triggered.connect(self.onGotoPreviousFeature)
m = QMenu()
m.setToolTip('Optional actions after clicking the next / previous feature button.')
m.setToolTipsVisible(True)
self.mOptionAutoSelectNextFeature = m.addAction('Auto select')
self.mOptionAutoSelectNextFeature.setToolTip('Automatically selects the next / previous feature')
self.mOptionAutoSelectNextFeature.setCheckable(True)
self.mOptionAutoSelectNextFeature.setIcon(QIcon(':/images/themes/default/mIconSelected.svg'))
self.mOptionAutoSelectNextFeature.setChecked(True)
self.mOptionAutoSelectNextFeature.setVisible(False)
self.mOptionAutoPan = m.addAction('Auto pan')
self.mOptionAutoPan.setToolTip('Automatically pans the the next / previous feature')
......@@ -767,10 +773,12 @@ class LabelWidget(AttributeTableWidget):
self.mOptionAutoUpdateImageVisibility = m.addAction('Auto visibility update')
self.mOptionAutoUpdateImageVisibility.setToolTip(
'Automatically updates the date visibility according to the displayed spatial extent.')
r'Automatically shows/hides dates that do/don\'t intersect with spatial map extent.')
self.mOptionAutoUpdateImageVisibility.setCheckable(True)
self.mOptionAutoUpdateImageVisibility.setIcon(QIcon(':/eotimeseriesviewer/icons/mapview.svg'))
self.mActionNextFeature.setMenu(m)
# self.mActionPreviousFeature.setMenu(m)
m = QMenu()
m.setToolTipsVisible(True)
......@@ -832,7 +840,9 @@ class LabelWidget(AttributeTableWidget):
def onGotoNextFeature(self, *arg):
# todo: allow to got to unselected features. needs VectorLayerTools support panToFids / zoomToFids
gotoNextFeature(self, options=self.gotoFeatureOptions())
fid = gotoNextFeature(self, options=self.gotoFeatureOptions())
if isinstance(fid, int):
self.mMainView.tableView().scrollToFeature(fid)
def gotoFeatureOptions(self) -> GotoFeatureOptions:
"""
......@@ -850,7 +860,9 @@ class LabelWidget(AttributeTableWidget):
return options
def onGotoPreviousFeature(self, *args):
gotoPreviousFeature(self)
fid = gotoPreviousFeature(self)
if isinstance(fid, int):
self.mMainView.tableView().scrollToFeature(fid)
def onShowContextMenu(self, menu: QMenu, idx: QModelIndex):
......
......@@ -1282,7 +1282,7 @@ class TimeSeriesFindOverlapTask(QgsTask):
x1 = min(lr.x(), ds.RasterXSize-1)
y1 = min(lr.y(), ds.RasterYSize-1)
xsize = x1-y0+1
xsize = x1-x0+1
ysize = y1-y0+1
if xsize <= 0 or ysize <= 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment