File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,17 @@ def __init__( self, figure ):
138138 w ,h = self .get_width_height ()
139139 self .resize ( w , h )
140140
141+ # JDH: Note the commented out code below does not work as
142+ # expected, because according to Pierre Raybaut, The reason is
143+ # that PyQt fails (silently) to call a method of this object
144+ # just before detroying it. Using a lambda function will work,
145+ # exactly the same as using a function (which is not bound to
146+ # the object to be destroyed).
147+ #
148+ #QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
149+ # self.close_event)
141150 QtCore .QObject .connect (self , QtCore .SIGNAL ('destroyed()' ),
142- self .close_event )
151+ lambda : self .close_event () )
143152
144153 def __timerEvent (self , event ):
145154 # hide until we can test and fix
You can’t perform that action at this time.
0 commit comments