ENH: Change inplace-add to normal add to support alternate syntax

Widgets can be added to Plugins inline, and Plugins can be added inline to Viewers.
This commit is contained in:
Tony S Yu
2012-07-24 00:58:35 -04:00
parent 6182cc9f1b
commit c1a859acae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ class Plugin(QtGui.QDialog):
self.layout.addWidget(widget, self.row, 0)
self.row += 1
def __iadd__(self, widget):
def __add__(self, widget):
self.add_widget(widget)
return self
+1 -1
View File
@@ -96,7 +96,7 @@ class ImageViewer(QtGui.QMainWindow):
self.connect_event('motion_notify_event', self.update_status_bar)
def __iadd__(self, plugin):
def __add__(self, plugin):
plugin.attach(self)
return self