Skip to content

Commit ff72453

Browse files
committed
fix deprectation warning
1 parent 0a1a1c8 commit ff72453

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pygame_matplotlib/gui_window.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
import pygame_gui
66
from pygame_gui.core.interfaces.manager_interface import IUIManagerInterface
77
from pygame_gui.core.ui_element import ObjectID
8+
from pygame_gui.elements.ui_window import UIWindow
89

910
from .backend_pygame import FigureSurface
1011
import matplotlib
1112

1213
matplotlib.use("pygame")
1314

1415

15-
class UIPlotWindow(pygame_gui.elements.ui_window.UIWindow):
16+
class UIPlotWindow(UIWindow):
1617
def __init__(
1718
self,
1819
rect: pygame.Rect,
@@ -44,4 +45,5 @@ def set_dimensions(self, *args, **kwargs):
4445

4546
def update_window_image(self):
4647
# Update the image of the container
47-
self.get_container().set_image(self.figuresurf)
48+
container = self.get_container()
49+
container._set_image(self.figuresurf)

0 commit comments

Comments
 (0)