mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-17 11:32:45 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user