This commit is contained in:
fieldOfView 2016-09-14 08:52:05 +02:00
commit 6334f74fc6
38 changed files with 125 additions and 47 deletions

View file

@ -20,18 +20,40 @@ SettingItem
property bool checked:
{
switch(propertyProvider.properties.value)
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
// Stacklevels
// 0: user -> unsaved change
// 1: quality changes -> saved change
// 2: quality
// 3: material -> user changed material in materials page
// 4: variant
// 5: machine
var value;
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
// We have a resolve function. Indicates that the setting is not settable per extruder and that
// we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this).
value = propertyProvider.properties.resolve;
} else {
value = propertyProvider.properties.value;
}
switch(value)
{
case "True":
return true
return true;
case "False":
return false
return false;
default:
return propertyProvider.properties.value
return value;
}
}
onClicked: { forceActiveFocus(); propertyProvider.setPropertyValue("value", !checked) }
onClicked:
{
forceActiveFocus();
propertyProvider.setPropertyValue("value", !checked);
}
Rectangle
{

View file

@ -96,8 +96,19 @@ SettingItem
}
function updateCurrentIndex() {
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
var value;
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
// We have a resolve function. Indicates that the setting is not settable per extruder and that
// we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this).
value = propertyProvider.properties.resolve;
} else {
value = propertyProvider.properties.value;
}
for(var i = 0; i < definition.options.length; ++i) {
if(definition.options[i].key == propertyProvider.properties.value) {
if(definition.options[i].key == value) {
currentIndex = i;
return;
}

View file

@ -234,14 +234,15 @@ Column
property var valueError:
{
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
if(data == "" || data == "True")
{
return false
}
if(data == "False")
{
return true
}
else
{
return false
}
}
enabled: !extrudersList.visible || base.currentExtruderIndex > -1