Merge pull request #1897 from alicevision/dev/improveClearImages

[ui] Improve "Clear Images" action's behaviour and performance
This commit is contained in:
Fabien Castan 2023-03-03 20:12:25 +01:00 committed by GitHub
commit ea323edb83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 21 deletions

View file

@ -733,6 +733,16 @@ class UIGraph(QObject):
def removeAttribute(self, attribute):
self.push(commands.ListAttributeRemoveCommand(self._graph, attribute))
@Slot()
def clearImages(self):
with self.groupedGraphModification("Clear Images"):
self.push(commands.ClearImagesCommand(self._graph, [self.cameraInit]))
@Slot()
def clearAllImages(self):
with self.groupedGraphModification("Clear All Images"):
self.push(commands.ClearImagesCommand(self._graph, list(self.cameraInits)))
@Slot(Node)
def appendSelection(self, node):
""" Append 'node' to the selection if it is not already part of the selection. """