BUG: in-place add should return object

Actually, I didn't mean to add `__iadd__` a couple of commits ago, so this was supposed to be an enhancement that allows you to access `add_widget` using in place adding.
This commit is contained in:
Tony S Yu
2012-07-24 00:51:31 -04:00
parent 1ae662f712
commit 4b3f6d6c30
+2 -1
View File
@@ -92,7 +92,7 @@ class Plugin(QtGui.QDialog):
def display_filtered_image(self, image):
"""Override this method to display image on image viewer."""
pass
self.image_viewer.image = image
def _get_value(self, param):
return param if not hasattr(param, 'val') else param.val()
@@ -112,6 +112,7 @@ class Plugin(QtGui.QDialog):
def __iadd__(self, widget):
self.add_widget(widget)
return self
def update_plugin(self, name, value):
setattr(self, name, value)