[tracks] react on move request and move window

This commit is contained in:
Jan Grewe 2025-03-01 17:11:37 +01:00
parent e3b26c3da4
commit 00b6b54db9

View File

@ -45,6 +45,7 @@ class FixTracks(QWidget):
self._timeline = DetectionTimeline() self._timeline = DetectionTimeline()
self._timeline.signals.windowMoved.connect(self.on_windowChanged) self._timeline.signals.windowMoved.connect(self.on_windowChanged)
self._timeline.signals.moveRequest.connect(self.on_moveRequest)
self._windowspinner = QSpinBox() self._windowspinner = QSpinBox()
self._windowspinner.setRange(10, 10000) self._windowspinner.setRange(10, 10000)
@ -343,6 +344,11 @@ class FixTracks(QWidget):
self.update() self.update()
self._manualmove = False self._manualmove = False
def on_moveRequest(self, pos):
new_pos = int(np.round(pos * self._maxframes))
self._currentWindowPos = new_pos
self.update()
def on_windowSizeChanged(self, value): def on_windowSizeChanged(self, value):
"""Reacts on the user window-width selection. Selection is done in the unit of frames. """Reacts on the user window-width selection. Selection is done in the unit of frames.