Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Nov 7, 2024
1 parent 3fab756 commit 3d22fcb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions wgpu/gui/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ def paintEvent(self, event): # noqa: N802 - this is a Qt method

# Methods that we add from wgpu (snake_case)

def update(self):
# Overload update() because that's how Qt devs are used to requesting a new draw
self.request_draw()

def _request_draw(self):
# Ask Qt to do a paint event
QtWidgets.QWidget.update(self)
Expand Down Expand Up @@ -494,16 +490,16 @@ def __init__(self, *, size=None, title=None, **kwargs):

# Qt methods

def update(self):
super().update()
self._subwidget.update()

def closeEvent(self, event): # noqa: N802
self._subwidget._is_closed = True
self.submit_event({"event_type": "close"})

# Methods that we add from wgpu (snake_case)

def update(self):
# Overload update() because that's how Qt devs are used to requesting a new draw
self.request_draw()

def _request_draw(self):
self._subwidget._request_draw()

Expand Down

0 comments on commit 3d22fcb

Please sign in to comment.