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:
authorIan Paschal <ian.paschal@gmail.com>2018-07-06 11:54:24 +0300
committerIan Paschal <ian.paschal@gmail.com>2018-07-06 11:54:24 +0300
commit2c291e02bed5d27cd64005b95e49a1fe387d3f95 (patch)
tree37f3cad0d1ee3bedaa7b70349975d1a22b16a04e /plugins
parent75d5828f5f6bc47177327a298a1c51453eb86844 (diff)
Revert "Fixes for StartSliceJob"
This reverts commit 9ec5770a1c2f64c50aee6a279645320e5bff8fe0.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CuraEngineBackend/StartSliceJob.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py
index 8f31e8cd0a..237c1f2dda 100644
--- a/plugins/CuraEngineBackend/StartSliceJob.py
+++ b/plugins/CuraEngineBackend/StartSliceJob.py
@@ -5,7 +5,7 @@ import numpy
from string import Formatter
from enum import IntEnum
import time
-from typing import Any, cast, Dict, List, Optional, Set
+from typing import Any, Dict, List, Optional, Set
import re
import Arcus #For typing.
@@ -114,7 +114,7 @@ class StartSliceJob(Job):
self.setResult(StartJobResult.Error)
return
- stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack())
+ stack = CuraApplication.getInstance().getGlobalContainerStack()
if not stack:
self.setResult(StartJobResult.Error)
return
@@ -216,11 +216,12 @@ class StartSliceJob(Job):
if temp_list:
object_groups.append(temp_list)
- extruders_enabled = {position: stack.isEnabled for position, extruder in stack.extruders.items()}
+ extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()}
filtered_object_groups = []
has_model_with_disabled_extruders = False
associated_disabled_extruders = set()
for group in object_groups:
+ stack = CuraApplication.getInstance().getGlobalContainerStack()
skip_group = False
for node in group:
extruder_position = node.callDecoration("getActiveExtruderPosition")
@@ -324,11 +325,11 @@ class StartSliceJob(Job):
# \param default_extruder_nr Stack nr to use when no stack nr is specified, defaults to the global stack
def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str:
if not self._all_extruders_settings:
- global_stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack())
+ global_stack = CuraApplication.getInstance().getGlobalContainerStack()
# NB: keys must be strings for the string formatter
self._all_extruders_settings = {
- "-1": self._buildReplacementTokens(cast(ContainerStack, global_stack))
+ "-1": self._buildReplacementTokens(global_stack)
}
for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):