diff --git a/sloth/core/labeltool.py b/sloth/core/labeltool.py index d1a0b9a..df758c8 100755 --- a/sloth/core/labeltool.py +++ b/sloth/core/labeltool.py @@ -429,6 +429,10 @@ class LabelTool(QObject): def selectPreviousAnnotation(self): if self._mainwindow is not None: return self._mainwindow.scene.selectNextItem(reverse=True) + + def selectAllAnnotations(self): + if self._mainwindow is not None: + return self._mainwindow.scene.selectAllItems() def deleteSelectedAnnotations(self): if self._mainwindow is not None: diff --git a/sloth/gui/annotationscene.py b/sloth/gui/annotationscene.py index e9a56bb..52981de 100644 --- a/sloth/gui/annotationscene.py +++ b/sloth/gui/annotationscene.py @@ -260,6 +260,10 @@ class AnnotationScene(QGraphicsScene): item.setSelected(True) break + def selectAllItems(self): + for item in self.items(): + item.setSelected(True) + def keyPressEvent(self, event): LOG.debug("keyPressEvent %s" % event)