BUG: Don't override image_filter method if defined by subclass

This commit is contained in:
Tony S Yu
2012-07-24 01:31:47 -04:00
parent c1a859acae
commit c2d2919bae
+3 -1
View File
@@ -32,7 +32,9 @@ class Plugin(QtGui.QDialog):
super(Plugin, self).__init__()
self.image_viewer = None
self.image_filter = image_filter
# If subclass defines `image_filter` method ignore input.
if not hasattr(self, 'image_filter'):
self.image_filter = image_filter
self.setWindowTitle(self.name)
self.layout = QtGui.QGridLayout(self)