mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
[python27] fix compatibility issues
This commit is contained in:
parent
2ba1278ee8
commit
b8eff927cc
2 changed files with 8 additions and 5 deletions
|
@ -21,10 +21,12 @@ class UndoCommand(QUndoCommand):
|
|||
return
|
||||
self.undoImpl()
|
||||
|
||||
def redoImpl(self) -> bool:
|
||||
def redoImpl(self):
|
||||
# type: () -> bool
|
||||
pass
|
||||
|
||||
def undoImpl(self) -> bool:
|
||||
def undoImpl(self):
|
||||
# type: () -> bool
|
||||
pass
|
||||
|
||||
|
||||
|
@ -38,7 +40,8 @@ class UndoStack(QUndoStack):
|
|||
self.undoTextChanged.connect(self._undoTextChanged)
|
||||
self.redoTextChanged.connect(self._redoTextChanged)
|
||||
|
||||
def tryAndPush(self, command: UndoCommand):
|
||||
def tryAndPush(self, command):
|
||||
# type: (UndoCommand) -> bool
|
||||
if command.redoImpl():
|
||||
command.setEnabled(False)
|
||||
self.push(command) # takes ownership
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue