Make progress dialogs pop up a bit sooner, to let impatient users know that Python is trying its very best.
This commit is contained in:
@@ -317,6 +317,7 @@ class TabbedPane(QtWidgets.QTabWidget):
|
||||
progress = QtWidgets.QProgressDialog('Resolving new nodes for resolution: ' + resolution_name +
|
||||
', please wait...', 'Abort Resolving Nodes', 0, steps, self)
|
||||
progress.setWindowModality(QtCore.Qt.WindowModal)
|
||||
progress.setMinimumDuration(1500)
|
||||
|
||||
# Get all the entities, then split it into several lists, to make searching & iterating through them faster.
|
||||
allEntities = [(entity['uid'], (entity[list(entity)[1]], entity['Entity Type']))
|
||||
@@ -1198,7 +1199,7 @@ class CanvasScene(QtWidgets.QGraphicsScene):
|
||||
progress = QtWidgets.QProgressDialog('Opening Canvas: ' + canvasName + ', please wait...',
|
||||
'', 0, steps, self.parent())
|
||||
# Remove Cancel button from progress bar (user should not be able to stop canvas from loading).
|
||||
|
||||
progress.setMinimumDuration(1500)
|
||||
progress.setCancelButton(None)
|
||||
progress.setWindowModality(QtCore.Qt.WindowModal)
|
||||
progressValue = 0
|
||||
|
||||
@@ -899,11 +899,13 @@ class MenuBar(QtWidgets.QMenuBar):
|
||||
baseFilesPath = Path(self.parent().SETTINGS.value('Project/FilesDir'))
|
||||
currTempDir = Path.home()
|
||||
|
||||
steps = len(websiteEntities)
|
||||
steps = len(websiteEntities) + 1
|
||||
progress = QtWidgets.QProgressDialog('Downloading websites, please wait...',
|
||||
'Abort', 0, steps, self.parent())
|
||||
progress.setMinimumDuration(0)
|
||||
progress.setWindowModality(QtCore.Qt.WindowModal)
|
||||
progressValue = 0
|
||||
progressValue = 1
|
||||
progress.setValue(progressValue)
|
||||
|
||||
def handle_response(response):
|
||||
try:
|
||||
@@ -985,11 +987,13 @@ class MenuBar(QtWidgets.QMenuBar):
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
steps = len(websiteEntities)
|
||||
steps = len(websiteEntities) + 1
|
||||
progress = QtWidgets.QProgressDialog('Screenshotting websites, please wait...',
|
||||
'Abort', 0, steps, self.parent())
|
||||
progress.setMinimumDuration(0)
|
||||
progress.setWindowModality(QtCore.Qt.WindowModal)
|
||||
progressValue = 0
|
||||
progressValue = 1
|
||||
progress.setValue(progressValue)
|
||||
|
||||
newNodes = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user