mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 08:48:40 +02:00
[Python Graph] Expose modification group methods
This commit is contained in:
parent
262e42a18c
commit
9b753cc358
1 changed files with 4 additions and 2 deletions
|
@ -476,13 +476,15 @@ class UIGraph(QObject):
|
|||
GroupedGraphModification: the instantiated context manager
|
||||
"""
|
||||
return commands.GroupedGraphModification(self._graph, self._undoStack, title, disableUpdates)
|
||||
|
||||
|
||||
@Slot(str)
|
||||
def beginModification(self, name):
|
||||
""" Begin a Graph modification. Calls to beginModification and endModification may be nested, but
|
||||
every call to beginModification must have a matching call to endModification. """
|
||||
self._modificationCount += 1
|
||||
self._undoStack.beginMacro(name)
|
||||
|
||||
|
||||
@Slot()
|
||||
def endModification(self):
|
||||
""" Ends a Graph modification. Must match a call to beginModification. """
|
||||
assert self._modificationCount > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue