overwrite parent method

This commit is contained in:
Andreas Preikschat 2011-10-15 09:52:25 +02:00
parent ec5991a197
commit a1a79c98d1

View File

@ -52,7 +52,7 @@ class MainDisplay(QtGui.QGraphicsView):
if live: if live:
QtGui.QGraphicsView.__init__(self) QtGui.QGraphicsView.__init__(self)
# Do not overwrite the parent() method. # Do not overwrite the parent() method.
self._parent = parent self.parent = lambda: parent
else: else:
QtGui.QGraphicsView.__init__(self, parent) QtGui.QGraphicsView.__init__(self, parent)
self.isLive = live self.isLive = live
@ -242,7 +242,7 @@ class MainDisplay(QtGui.QGraphicsView):
self.image(name) self.image(name)
# Update the preview frame. # Update the preview frame.
if self.isLive: if self.isLive:
self._parent.updatePreview() self.parent().updatePreview()
return True return True
return False return False