Fix: obey nested option
This commit is contained in:
parent
384975dd46
commit
d2942c7aca
|
@ -45,6 +45,7 @@ class ProgressDialog(QtGui.QProgressDialog):
|
||||||
self._nestingReady = False
|
self._nestingReady = False
|
||||||
self._topDialog = None
|
self._topDialog = None
|
||||||
self._subBars = []
|
self._subBars = []
|
||||||
|
self.nested = nested
|
||||||
|
|
||||||
isGuiThread = QtCore.QThread.currentThread() == QtCore.QCoreApplication.instance().thread()
|
isGuiThread = QtCore.QThread.currentThread() == QtCore.QCoreApplication.instance().thread()
|
||||||
self.disabled = disable or (not isGuiThread)
|
self.disabled = disable or (not isGuiThread)
|
||||||
|
@ -77,7 +78,7 @@ class ProgressDialog(QtGui.QProgressDialog):
|
||||||
if self.busyCursor:
|
if self.busyCursor:
|
||||||
QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
|
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 = ProgressDialog.allDialogs[0]
|
||||||
topDialog._addSubDialog(self)
|
topDialog._addSubDialog(self)
|
||||||
self._topDialog = topDialog
|
self._topDialog = topDialog
|
||||||
|
|
Loading…
Reference in New Issue
Block a user