Commit 9a6699fc authored by Valentin Valls's avatar Valentin Valls

Allow to use transaction as with-as syntax

parent c0fcb7c8
......@@ -130,7 +130,7 @@ class Plot(qt.QObject):
self.__inTransaction += 1
self.transactionStarted.emit()
try:
yield
yield self
finally:
self.__inTransaction -= 1
self.transactionFinished.emit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment