mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:28:59 +08: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
@ -29,7 +29,7 @@ SettingItem
|
|||||||
// 4: variant
|
// 4: variant
|
||||||
// 5: machine
|
// 5: machine
|
||||||
var value
|
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 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
|
||||||
|
@ -54,7 +54,7 @@ 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 = undefined
|
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 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
|
||||||
|
@ -36,6 +36,20 @@ Item
|
|||||||
property var resolve: Cura.MachineManager.activeStackId !== Cura.MachineManager.activeMachineId ? propertyProvider.properties.resolve : "None"
|
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]
|
||||||
|
// 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 focusReceived()
|
||||||
signal setActiveFocusToNextSetting(bool forward)
|
signal setActiveFocusToNextSetting(bool forward)
|
||||||
@ -184,7 +198,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: revertButton
|
id: revertButton
|
||||||
|
|
||||||
visible: base.stackLevel == 0 && base.showRevertButton
|
visible: base.resetButtonVisible
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: height
|
width: height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user