🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/backend_nbagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from matplotlib import is_interactive
from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import _Backend, NavigationToolbar2
from matplotlib.backend_bases import _Backend, CloseEvent, NavigationToolbar2
from .backend_webagg_core import (
FigureCanvasWebAggCore, FigureManagerWebAgg, NavigationToolbar2WebAgg)
from .backend_webagg_core import ( # noqa: F401 # pylint: disable=W0611
Expand Down Expand Up @@ -149,7 +149,7 @@ def clearup_closed(self):
if socket.is_open()}

if len(self.web_sockets) == 0:
self.canvas.close_event()
CloseEvent("close_event", self.canvas)._process()

def remove_comm(self, comm_id):
self.web_sockets = {socket for socket in self.web_sockets
Expand Down