mirror of
https://github.com/wassname/sloth.git
synced 2026-08-03 13:10:49 +08:00
Fix going to next/previous frame/image
This commit is contained in:
@@ -250,16 +250,16 @@ class LabelTool(QObject):
|
||||
return self._model
|
||||
|
||||
def gotoNext(self):
|
||||
# TODO move this to the scene
|
||||
if self._model is not None and self._current_image is not None:
|
||||
next_image = self._current_image.getNextSibling()
|
||||
self.setCurrentImage(next_image)
|
||||
if next_image is not None:
|
||||
self.setCurrentImage(next_image)
|
||||
|
||||
def gotoPrevious(self):
|
||||
# TODO move this to the scene
|
||||
if self._model is not None and self._current_image is not None:
|
||||
prev_image = self._current_image.getPreviousSibling()
|
||||
self.setCurrentImage(prev_image)
|
||||
if prev_image is not None:
|
||||
self.setCurrentImage(prev_image)
|
||||
|
||||
def updateModified(self):
|
||||
"""update all GUI elements which depend on the state of the model,
|
||||
|
||||
Reference in New Issue
Block a user