mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
After reconecting to another port update job status '_is_cancelled' to false
CURA-5549
This commit is contained in:
parent
31891e631c
commit
817a304ed1
2 changed files with 8 additions and 0 deletions
|
@ -534,6 +534,11 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
|
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
|
||||||
Logger.log("w", "A socket error caused the connection to be reset")
|
Logger.log("w", "A socket error caused the connection to be reset")
|
||||||
|
|
||||||
|
# _terminate()' function sets the job status to 'cancel', after reconnecting to another Port the job status
|
||||||
|
# needs to be updated. Otherwise backendState is "Unable To Slice"
|
||||||
|
if error.getErrorCode() == Arcus.ErrorCode.BindFailedError and self._start_slice_job is not None:
|
||||||
|
self._start_slice_job.setIsCancelled(False)
|
||||||
|
|
||||||
## Remove old layer data (if any)
|
## Remove old layer data (if any)
|
||||||
def _clearLayerData(self, build_plate_numbers: Set = None) -> None:
|
def _clearLayerData(self, build_plate_numbers: Set = None) -> None:
|
||||||
for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax.
|
for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax.
|
||||||
|
|
|
@ -290,6 +290,9 @@ class StartSliceJob(Job):
|
||||||
def isCancelled(self) -> bool:
|
def isCancelled(self) -> bool:
|
||||||
return self._is_cancelled
|
return self._is_cancelled
|
||||||
|
|
||||||
|
def setIsCancelled(self, value: bool):
|
||||||
|
self._is_cancelled = value
|
||||||
|
|
||||||
## Creates a dictionary of tokens to replace in g-code pieces.
|
## Creates a dictionary of tokens to replace in g-code pieces.
|
||||||
#
|
#
|
||||||
# This indicates what should be replaced in the start and end g-codes.
|
# This indicates what should be replaced in the start and end g-codes.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue