Skip to content

Commit

Permalink
WaiterOverlay: stop waiting before closing
Browse files Browse the repository at this point in the history
  • Loading branch information
payno committed Jul 10, 2023
1 parent fdb1ec3 commit f68529b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/silx/gui/utils/test/test_waiter_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ def test_show(qapp_utils):
plot.show()
waitingOverlay.setWaiting(False)

assert waitingOverlay.getBaseWidget() is plot
assert waitingOverlay.getBaseWidget() is plot

plot.close()
waitingOverlay.close()
4 changes: 4 additions & 0 deletions src/silx/gui/utils/waiteroverlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def __init__(self, underlying_widget: qt.QWidget) -> None:
def setText(self, text: str):
self._waitingButton.setText(text)

def close(self):
self._waitingButton.setWaiting(False)
super().close()

def getBaseWidget(self) -> Optional[qt.QWidget]:
return self._baseWidget()

Expand Down

0 comments on commit f68529b

Please sign in to comment.