Skip to content

Commit ae96b4f

Browse files
fix class reference
1 parent 0bd9367 commit ae96b4f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/matplotlib/backends/_backend_tk.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,10 +881,12 @@ def new_figure_manager_given_figure(cls, num, figure):
881881
def trigger_manager_draw(manager):
882882
manager.show()
883883

884-
@classmethod
885-
def mainloop(cls):
884+
@staticmethod
885+
def mainloop():
886886
managers = Gcf.get_all_fig_managers()
887887
if managers:
888-
cls._owns_mainloop = True
889-
managers[0].window.mainloop()
890-
cls._owns_mainloop = False
888+
first_manager = managers[0]
889+
manager_class = type(first_manager)
890+
manager_class._owns_mainloop = True
891+
first_manager.window.mainloop()
892+
manager_class._owns_mainloop = False

0 commit comments

Comments
 (0)