mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Simplify dependencies on activeStack
The properties, being formulas, were not properly updated when the active stack changed. Contributes to issue CURA-5876.
This commit is contained in:
parent
18bb403413
commit
ede50ef3ca
1 changed files with 4 additions and 7 deletions
|
@ -135,7 +135,7 @@ Item
|
|||
|
||||
OldControls.CheckBox
|
||||
{
|
||||
checked: selectors.model != null ? Cura.MachineManager.getExtruder(selectors.model.index).isEnabled: false
|
||||
checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false
|
||||
onClicked: Cura.MachineManager.setExtruderEnabled(selectors.model.index, checked)
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
style: UM.Theme.styles.checkbox
|
||||
|
@ -160,14 +160,11 @@ Item
|
|||
{
|
||||
id: materialSelection
|
||||
|
||||
property var activeExtruder: Cura.MachineManager.activeStack
|
||||
property var hasActiveExtruder: activeExtruder != null
|
||||
property var currentRootMaterialName: hasActiveExtruder ? activeExtruder.material.name : ""
|
||||
property var valueError: hasActiveExtruder ? Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible", "") != "True" : true
|
||||
property var valueError: Cura.MachineManager.activeStack != null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "compatible", "") != "True" : true
|
||||
property var valueWarning: !Cura.MachineManager.isActiveQualitySupported
|
||||
|
||||
text: currentRootMaterialName
|
||||
tooltip: currentRootMaterialName
|
||||
text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.material.name : ""
|
||||
tooltip: text
|
||||
visible: Cura.MachineManager.hasMaterials
|
||||
|
||||
enabled: Cura.ExtruderManager.activeExtruderIndex > -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue