Skip to content

Commit b16fcf9

Browse files
committed
FIX: move logic where it should be
1 parent bd0a3f8 commit b16fcf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_nbagg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def on_close(self):
285285
# the FigureManager.
286286
self.comm.close()
287287
self.manager.clearup_closed()
288+
self.manager.canvas.close_event()
288289

289290
def send_json(self, content):
290291
self.comm.send({'data': json.dumps(content)})
@@ -307,7 +308,6 @@ def on_message(self, message):
307308
message = json.loads(message['content']['data'])
308309
if message['type'] == 'closing':
309310
self.on_close()
310-
self.manager.canvas.close_event()
311311
elif message['type'] == 'supports_binary':
312312
self.supports_binary = message['value']
313313
else:

0 commit comments

Comments
 (0)