Merge pull request #1744 from alicevision/dev/internalAttributes

Add internal attributes in "Notes" tab
This commit is contained in:
Fabien Castan 2023-03-05 13:46:47 +01:00 committed by GitHub
commit ce2085faad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 471 additions and 25 deletions

View file

@ -264,11 +264,17 @@ class SetAttributeCommand(GraphCommand):
def redoImpl(self):
if self.value == self.oldValue:
return False
self.graph.attribute(self.attrName).value = self.value
if self.graph.attribute(self.attrName) is not None:
self.graph.attribute(self.attrName).value = self.value
else:
self.graph.internalAttribute(self.attrName).value = self.value
return True
def undoImpl(self):
self.graph.attribute(self.attrName).value = self.oldValue
if self.graph.attribute(self.attrName) is not None:
self.graph.attribute(self.attrName).value = self.oldValue
else:
self.graph.internalAttribute(self.attrName).value = self.oldValue
class AddEdgeCommand(GraphCommand):