Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Ultimaker/Cura
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghostkeeper committed Apr 18, 2017
2 parents e33d469 + 865ab71 commit 7dbb087
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions resources/qml/Preferences/MaterialView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,28 @@ TabView
{
id: spinBox
anchors.left: label.right
value: parseFloat(provider.properties.value);
width: base.secondColumnWidth;
value: {
if (!isNaN(parseFloat(materialPropertyProvider.properties.value)))
{
return parseFloat(materialPropertyProvider.properties.value);
}
if (!isNaN(parseFloat(machinePropertyProvider.properties.value)))
{
return parseFloat(machinePropertyProvider.properties.value);
}
return 0;
}
width: base.secondColumnWidth
readOnly: !base.editingEnabled
suffix: model.unit
suffix: " " + model.unit
maximumValue: 99999
decimals: model.unit == "mm" ? 2 : 0

onEditingFinished: provider.setPropertyValue("value", value)
onEditingFinished: materialPropertyProvider.setPropertyValue("value", value)
}

UM.ContainerPropertyProvider { id: provider; containerId: base.containerId; watchedProperties: [ "value" ]; key: model.key }
UM.ContainerPropertyProvider { id: materialPropertyProvider; containerId: base.containerId; watchedProperties: [ "value" ]; key: model.key }
UM.ContainerPropertyProvider { id: machinePropertyProvider; containerId: Cura.MachineManager.activeDefinitionId; watchedProperties: [ "value" ]; key: model.key }
}
}
}
Expand Down

0 comments on commit 7dbb087

Please sign in to comment.