Fix going to next/previous frame/image

This commit is contained in:
Mika Fischer
2011-06-16 11:45:04 +02:00
parent 48a4cc28f5
commit 2d4e401cb2
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class ModelItem:
p = self.parent()
if p is not None:
row = p.getPosOfChild(self)
if row < len(p.children()) - 2:
if row < len(p.children()) - 1:
return p.getChildAt(row+1)
return None
+4 -4
View File
@@ -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,