diff --git a/fixtracks/widgets/tracks.py b/fixtracks/widgets/tracks.py index 9cce7b9..95f1d3f 100644 --- a/fixtracks/widgets/tracks.py +++ b/fixtracks/widgets/tracks.py @@ -45,6 +45,7 @@ class FixTracks(QWidget): self._timeline = DetectionTimeline() self._timeline.signals.windowMoved.connect(self.on_windowChanged) + self._timeline.signals.moveRequest.connect(self.on_moveRequest) self._windowspinner = QSpinBox() self._windowspinner.setRange(10, 10000) @@ -343,6 +344,11 @@ class FixTracks(QWidget): self.update() 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): """Reacts on the user window-width selection. Selection is done in the unit of frames.