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):
250250 self ._cid = Q .ax .figure .callbacks .connect ('dpi_changed' ,
251251 on_dpi_change )
252252
253- self ._cb_ref = weakref .ref (Q .ax .figure .callbacks )
254-
255253 self .labelpos = kw .pop ('labelpos' , 'N' )
256254 self .labelcolor = kw .pop ('labelcolor' , None )
257255 self .fontproperties = kw .pop ('fontproperties' , dict ())
@@ -273,11 +271,8 @@ def remove(self):
273271 """
274272 Overload the remove method
275273 """
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
281276 # pass the remove call up the stack
282277 martist .Artist .remove (self )
283278
You can’t perform that action at this time.
0 commit comments