Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Jack Ha 2018-03-19 14:02:12 +01:00
commit 90fa49b6a1
10 changed files with 18 additions and 15 deletions

View file

@ -1227,7 +1227,7 @@ class MachineManager(QObject):
self._updateQualityWithMaterial()
@pyqtSlot(str, "QVariant")
def setVariantGroup(self, position, container_node):
def setVariant(self, position, container_node):
position = str(position)
self.blurSettings.emit()
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):

View file

@ -3,13 +3,14 @@ from typing import Any, Optional
from UM.Application import Application
from UM.Decorators import override
from UM.Settings.Interfaces import PropertyEvaluationContext
from UM.Settings.ContainerStack import ContainerStack
from UM.Settings.SettingInstance import InstanceState
from .CuraContainerStack import CuraContainerStack
class PerObjectContainerStack(ContainerStack):
@override(ContainerStack)
class PerObjectContainerStack(CuraContainerStack):
@override(CuraContainerStack)
def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any:
if context is None:
context = PropertyEvaluationContext()
@ -51,8 +52,8 @@ class PerObjectContainerStack(ContainerStack):
context.popContainer()
return result
@override(ContainerStack)
def setNextStack(self, stack: ContainerStack):
@override(CuraContainerStack)
def setNextStack(self, stack: CuraContainerStack):
super().setNextStack(stack)
# trigger signal to re-evaluate all default settings

View file

@ -3,7 +3,6 @@
import copy
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
from UM.Signal import Signal, signalemitter
from UM.Settings.InstanceContainer import InstanceContainer
@ -33,9 +32,11 @@ class SettingOverrideDecorator(SceneNodeDecorator):
def __init__(self):
super().__init__()
self._stack = PerObjectContainerStack(stack_id = "per_object_stack_" + str(id(self)))
self._stack = PerObjectContainerStack(container_id = "per_object_stack_" + str(id(self)))
self._stack.setDirty(False) # This stack does not need to be saved.
self._stack.addContainer(InstanceContainer(container_id = "SettingOverrideInstanceContainer"))
user_container = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
user_container.addMetaDataEntry("type", "user")
self._stack.userChanges = user_container
self._extruder_stack = ExtruderManager.getInstance().getExtruderStack(0).getId()
self._is_non_printing_mesh = False

View file

@ -216,7 +216,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
@pyqtProperty("QVariantList", notify=printJobsChanged)
def queuedPrintJobs(self) -> List[PrintJobOutputModel]:
return [print_job for print_job in self._print_jobs if print_job.assignedPrinter is None or print_job.state == "queued"]
return [print_job for print_job in self._print_jobs if print_job.state == "queued"]
@pyqtProperty("QVariantList", notify=printJobsChanged)
def activePrintJobs(self) -> List[PrintJobOutputModel]:

View file

@ -32,7 +32,7 @@ Menu
}
exclusiveGroup: group
onTriggered: {
Cura.MachineManager.setVariantGroup(menu.extruderIndex, model.container_node);
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
}
}

View file

@ -41,8 +41,7 @@ Menu
MenuItem
{
text: catalog.i18nc("@action:inmenu", "Show All Settings")
checkable: true
checked: showingAllSettings
checkable: false
exclusiveGroup: group
onTriggered:
{

View file

@ -46,6 +46,7 @@ retraction_count_max = 25
retraction_extrusion_window = 1
retraction_hop = 2
retraction_hop_only_when_collides = True
retraction_min_travel = =line_width * 2
skin_overlap = 5
speed_equalize_flow_enabled = True
speed_layer_0 = 20

View file

@ -57,7 +57,7 @@ retraction_count_max = 15
retraction_extrusion_window = =retraction_amount
retraction_hop = 2
retraction_hop_only_when_collides = True
retraction_min_travel = 5
retraction_min_travel = =line_width * 3
retraction_prime_speed = 15
skin_overlap = 5
speed_layer_0 = 20

View file

@ -46,6 +46,7 @@ retraction_count_max = 25
retraction_extrusion_window = 1
retraction_hop = 2
retraction_hop_only_when_collides = True
retraction_min_travel = =line_width * 2
skin_overlap = 5
speed_equalize_flow_enabled = True
speed_layer_0 = 20

View file

@ -57,7 +57,7 @@ retraction_count_max = 15
retraction_extrusion_window = =retraction_amount
retraction_hop = 2
retraction_hop_only_when_collides = True
retraction_min_travel = 5
retraction_min_travel = =line_width * 3
retraction_prime_speed = 15
skin_overlap = 5
speed_layer_0 = 20