From 00b6b54db9075143be0a3837e088c6b8d798a723 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sat, 1 Mar 2025 17:11:37 +0100 Subject: [PATCH] [tracks] react on move request and move window --- fixtracks/widgets/tracks.py | 6 ++++++ 1 file changed, 6 insertions(+) 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.