[tracks] delegate window resize and moving to timeline and update view
This commit is contained in:
parent
c836717aa9
commit
641ca36b93
@ -466,6 +466,9 @@ class FixTracks(QWidget):
|
|||||||
if state and self._reader is not None:
|
if state and self._reader is not None:
|
||||||
self._data.setData(self._reader.asdict)
|
self._data.setData(self._reader.asdict)
|
||||||
self._timeline.setDetectionData(self._data.data)
|
self._timeline.setDetectionData(self._data.data)
|
||||||
|
maxframes = self._data.max("frame")
|
||||||
|
rel_width = self._windowspinner.value / maxframes
|
||||||
|
self._timeline.setWindowWidth(rel_width)
|
||||||
self.update()
|
self.update()
|
||||||
self._saveBtn.setEnabled(True)
|
self._saveBtn.setEnabled(True)
|
||||||
|
|
||||||
@ -516,7 +519,16 @@ class FixTracks(QWidget):
|
|||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def on_windowSizeChanged(self, value):
|
def on_windowSizeChanged(self, value):
|
||||||
self._timeline.setWindowWidth(value)
|
"""Reacts on the user window-width selection. Selection is done in the unit of frames.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
value : int
|
||||||
|
The width of the observation window in frames.
|
||||||
|
"""
|
||||||
|
max_frames = self._data.max("frame")
|
||||||
|
rel_width = value / max_frames
|
||||||
|
self._timeline.setWindowWidth(rel_width)
|
||||||
|
|
||||||
def on_detectionsSelected(self, detections):
|
def on_detectionsSelected(self, detections):
|
||||||
logging.debug("Tracks: Detections selected")
|
logging.debug("Tracks: Detections selected")
|
||||||
|
Loading…
Reference in New Issue
Block a user