From ab5a2c5d1167238c74eb862ae26a82c8d0ebc8d3 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 13 Jul 2020 12:53:59 -0700 Subject: [PATCH] BusyCursor: only restore cursor after all nested levels have exited --- pyqtgraph/widgets/BusyCursor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/BusyCursor.py b/pyqtgraph/widgets/BusyCursor.py index f6bbc84c..29fc3051 100644 --- a/pyqtgraph/widgets/BusyCursor.py +++ b/pyqtgraph/widgets/BusyCursor.py @@ -31,4 +31,5 @@ class BusyCursor(object): def __exit__(self, *args): if self._active: BusyCursor.active.pop(-1) - QtGui.QApplication.restoreOverrideCursor() + if len(BusyCursor.active) == 0: + QtGui.QApplication.restoreOverrideCursor()