Resolve is now updated from the base property

The resolve doesn't update always update well for single extrusion machines, so the wrong value gets used.
There is however, no need for a resolve with a single extrusion machine, so we can disable the resolve for those alltogether.

CURA-2939
This commit is contained in:
Jaime van Kessel 2016-11-21 11:10:23 +01:00
parent 6dc194d8de
commit 9057174691
4 changed files with 8 additions and 7 deletions

View file

@ -29,11 +29,11 @@ SettingItem
// 4: variant // 4: variant
// 5: machine // 5: machine
var value; var value;
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) { if ((base.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
// We have a resolve function. Indicates that the setting is not settable per extruder and that // 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 // we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this). // (if user has explicitly set this).
value = propertyProvider.properties.resolve; value = base.resolve;
} else { } else {
value = propertyProvider.properties.value; value = propertyProvider.properties.value;
} }

View file

@ -96,11 +96,11 @@ SettingItem
{ {
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model. // FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
var value; var value;
if ((propertyProvider.properties.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) { if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) {
// We have a resolve function. Indicates that the setting is not settable per extruder and that // 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 // we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this). // (if user has explicitly set this).
value = propertyProvider.properties.resolve; value = base.resolve;
} else { } else {
value = propertyProvider.properties.value; value = propertyProvider.properties.value;
} }

View file

@ -27,7 +27,8 @@ Item {
// Create properties to put property provider stuff in (bindings break in qt 5.5.1 otherwise) // Create properties to put property provider stuff in (bindings break in qt 5.5.1 otherwise)
property var state: propertyProvider.properties.state property var state: propertyProvider.properties.state
property var resolve: propertyProvider.properties.resolve // There is no resolve property if there is only one stack.
property var resolve: Cura.MachineManager.activeStackId != Cura.MachineManager.activeMachineId ? propertyProvider.properties.resolve : "None"
property var stackLevels: propertyProvider.stackLevels property var stackLevels: propertyProvider.stackLevels
property var stackLevel: stackLevels[0] property var stackLevel: stackLevels[0]

View file

@ -114,11 +114,11 @@ SettingItem
// 3: material -> user changed material in materialspage // 3: material -> user changed material in materialspage
// 4: variant // 4: variant
// 5: machine // 5: machine
if ((propertyProvider.properties.resolve != "None" && propertyProvider.properties.resolve) && (stackLevel != 0) && (stackLevel != 1)) { if ((base.resolve != "None" && base.resolve) && (stackLevel != 0) && (stackLevel != 1)) {
// We have a resolve function. Indicates that the setting is not settable per extruder and that // 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 // we have to choose between the resolved value (default) and the global value
// (if user has explicitly set this). // (if user has explicitly set this).
return propertyProvider.properties.resolve; return base.resolve;
} else { } else {
return propertyProvider.properties.value; return propertyProvider.properties.value;
} }