Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-06-23 15:12:28 +0300
committerJaime van Kessel <nallath@gmail.com>2020-06-23 15:12:28 +0300
commit90c618363411f473594b6c59cabed06d2ec6c3cb (patch)
tree7e59eb724cbd69899877a3f57010f76fb6f55a1a /plugins/CuraEngineBackend
parent398540663441ee770b189491765232b2677195e3 (diff)
Add process events triggers to startSliceJob
Prevents a freeze when the setting message is being calculated CURA-7106
Diffstat (limited to 'plugins/CuraEngineBackend')
-rw-r--r--plugins/CuraEngineBackend/StartSliceJob.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py
index 514f6c5ee6..fbe820c445 100644
--- a/plugins/CuraEngineBackend/StartSliceJob.py
+++ b/plugins/CuraEngineBackend/StartSliceJob.py
@@ -8,6 +8,7 @@ import time
from typing import Any, cast, Dict, List, Optional, Set
import re
import Arcus #For typing.
+from PyQt5.QtCore import QCoreApplication
from UM.Job import Job
from UM.Logger import Logger
@@ -372,9 +373,11 @@ class StartSliceJob(Job):
self._all_extruders_settings = {
"-1": self._buildReplacementTokens(global_stack)
}
+ QCoreApplication.processEvents() # Ensure that the GUI does not freeze.
for extruder_stack in ExtruderManager.getInstance().getActiveExtruderStacks():
extruder_nr = extruder_stack.getProperty("extruder_nr", "value")
self._all_extruders_settings[str(extruder_nr)] = self._buildReplacementTokens(extruder_stack)
+ QCoreApplication.processEvents() # Ensure that the GUI does not freeze.
def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str:
"""Replace setting tokens in a piece of g-code.