File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,6 @@ def on_dpi_change(fig):
250
250
self ._cid = Q .ax .figure .callbacks .connect ('dpi_changed' ,
251
251
on_dpi_change )
252
252
253
- self ._cb_ref = weakref .ref (Q .ax .figure .callbacks )
254
-
255
253
self .labelpos = kw .pop ('labelpos' , 'N' )
256
254
self .labelcolor = kw .pop ('labelcolor' , None )
257
255
self .fontproperties = kw .pop ('fontproperties' , dict ())
@@ -273,11 +271,8 @@ def remove(self):
273
271
"""
274
272
Overload the remove method
275
273
"""
276
- _cbs = self ._cb_ref ()
277
- if _cbs is not None :
278
- # disconnect the call back
279
- _cbs .disconnect (self ._cid )
280
- self ._cid = None
274
+ Q .ax .figure .callbacks .disconnect (self ._cid )
275
+ self ._cid = None
281
276
# pass the remove call up the stack
282
277
martist .Artist .remove (self )
283
278
You can’t perform that action at this time.
0 commit comments