mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Merge pull request #5791 from Ultimaker/CURA-6490_fix_ppa_attempt2
CURA-6490 Fix settings attempt 2
This commit is contained in:
commit
7aa17da536
3 changed files with 17 additions and 3 deletions
|
@ -29,7 +29,7 @@ SettingItem
|
|||
// 4: variant
|
||||
// 5: machine
|
||||
var value
|
||||
if ((base.resolve != "None") && (stackLevel != 0) && (stackLevel != 1))
|
||||
if ((base.resolve !== undefined && 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 to choose between the resolved value (default) and the global value
|
||||
|
|
|
@ -54,7 +54,7 @@ SettingItem
|
|||
{
|
||||
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||
var value = undefined
|
||||
if ((base.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1))
|
||||
if ((base.resolve !== undefined && 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 to choose between the resolved value (default) and the global value
|
||||
|
|
|
@ -36,6 +36,20 @@ Item
|
|||
property var resolve: Cura.MachineManager.activeStackId !== Cura.MachineManager.activeMachineId ? propertyProvider.properties.resolve : "None"
|
||||
property var stackLevels: propertyProvider.stackLevels
|
||||
property var stackLevel: stackLevels[0]
|
||||
// A list of stack levels that will trigger to show the revert button
|
||||
property var showRevertStackLevels: [0]
|
||||
property bool resetButtonVisible: {
|
||||
var is_revert_stack_level = false;
|
||||
for (var i in base.showRevertStackLevels)
|
||||
{
|
||||
if (base.stackLevel == i)
|
||||
{
|
||||
is_revert_stack_level = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return is_revert_stack_level && base.showRevertButton
|
||||
}
|
||||
|
||||
signal focusReceived()
|
||||
signal setActiveFocusToNextSetting(bool forward)
|
||||
|
@ -184,7 +198,7 @@ Item
|
|||
{
|
||||
id: revertButton
|
||||
|
||||
visible: base.stackLevel == 0 && base.showRevertButton
|
||||
visible: base.resetButtonVisible
|
||||
|
||||
height: parent.height
|
||||
width: height
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue