From d2942c7acadef3910311c21b5e72cb3cbd854aa3 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Wed, 4 Oct 2017 09:06:05 -0700 Subject: [PATCH] Fix: obey nested option --- pyqtgraph/widgets/ProgressDialog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/ProgressDialog.py b/pyqtgraph/widgets/ProgressDialog.py index e62a6551..6bda4b95 100644 --- a/pyqtgraph/widgets/ProgressDialog.py +++ b/pyqtgraph/widgets/ProgressDialog.py @@ -45,6 +45,7 @@ class ProgressDialog(QtGui.QProgressDialog): self._nestingReady = False self._topDialog = None self._subBars = [] + self.nested = nested isGuiThread = QtCore.QThread.currentThread() == QtCore.QCoreApplication.instance().thread() self.disabled = disable or (not isGuiThread) @@ -77,7 +78,7 @@ class ProgressDialog(QtGui.QProgressDialog): if self.busyCursor: QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor)) - if len(ProgressDialog.allDialogs) > 0: + if self.nested and len(ProgressDialog.allDialogs) > 0: topDialog = ProgressDialog.allDialogs[0] topDialog._addSubDialog(self) self._topDialog = topDialog