File tree 1 file changed +10
-1
lines changed
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 ):
138
138
w ,h = self .get_width_height ()
139
139
self .resize ( w , h )
140
140
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)
141
150
QtCore .QObject .connect (self , QtCore .SIGNAL ('destroyed()' ),
142
- self .close_event )
151
+ lambda : self .close_event () )
143
152
144
153
def __timerEvent (self , event ):
145
154
# hide until we can test and fix
You can’t perform that action at this time.
0 commit comments