mirror of
https://github.com/wassname/sloth.git
synced 2026-06-27 19:01:02 +08:00
Add functions to select all items (the typical Ctrl + a action).
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user