mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 04:45:09 +08:00
Merge branch 'cura_containerstack' of github.com:Ultimaker/Cura into cura_containerstack
This commit is contained in:
commit
0fe1b54588
@ -18,6 +18,8 @@ class ExtruderStack(CuraContainerStack):
|
||||
def __init__(self, container_id, *args, **kwargs):
|
||||
super().__init__(container_id, *args, **kwargs)
|
||||
|
||||
self.addMetaDataEntry("type", "extruder_train") # For backward compatibility
|
||||
|
||||
@override(ContainerStack)
|
||||
def setNextStack(self, stack):
|
||||
super().setNextStack(stack)
|
||||
|
@ -21,6 +21,8 @@ class GlobalStack(CuraContainerStack):
|
||||
def __init__(self, container_id: str, *args, **kwargs):
|
||||
super().__init__(container_id, *args, **kwargs)
|
||||
|
||||
self.addMetaDataEntry("type", "machine") # For backward compatibility
|
||||
|
||||
self._extruders = []
|
||||
|
||||
self._resolving_property = None
|
||||
|
@ -500,7 +500,6 @@ class MachineManager(QObject):
|
||||
return ""
|
||||
|
||||
@pyqtProperty(str, notify = globalContainerChanged)
|
||||
@deprecated("Use activeMachine.name", "2.6")
|
||||
def activeMachineName(self) -> str:
|
||||
if self._global_container_stack:
|
||||
return self._global_container_stack.getName()
|
||||
@ -508,7 +507,6 @@ class MachineManager(QObject):
|
||||
return ""
|
||||
|
||||
@pyqtProperty(str, notify = globalContainerChanged)
|
||||
@deprecated("Use activeMachine.id", "2.6")
|
||||
def activeMachineId(self) -> str:
|
||||
if self._global_container_stack:
|
||||
return self._global_container_stack.getId()
|
||||
|
@ -230,20 +230,7 @@ class StartSliceJob(Job):
|
||||
keys = stack.getAllKeys()
|
||||
settings = {}
|
||||
for key in keys:
|
||||
# Use resolvement value if available, or take the value
|
||||
resolved_value = stack.getProperty(key, "resolve")
|
||||
if resolved_value is not None:
|
||||
# There is a resolvement value. Check if we need to use it.
|
||||
user_container = stack.findContainer({"type": "user"})
|
||||
quality_changes_container = stack.findContainer({"type": "quality_changes"})
|
||||
if user_container.hasProperty(key,"value") or quality_changes_container.hasProperty(key,"value"):
|
||||
# Normal case
|
||||
settings[key] = stack.getProperty(key, "value")
|
||||
else:
|
||||
settings[key] = resolved_value
|
||||
else:
|
||||
# Normal case
|
||||
settings[key] = stack.getProperty(key, "value")
|
||||
settings[key] = stack.getProperty(key, "value")
|
||||
Job.yieldThread()
|
||||
|
||||
start_gcode = settings["machine_start_gcode"]
|
||||
|
@ -19,7 +19,7 @@ Menu
|
||||
{
|
||||
text: model.name + " - " + model.layer_height
|
||||
checkable: true
|
||||
checked: Cura.MachineManager.activeQualityChangesId == "empty_quality_changes" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
|
||||
checked: Cura.MachineManager.activeQualityChangesId == "" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user