mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Also speed up the expression for the value of a setting item
This commit is contained in:
parent
285a4584e7
commit
9ca5a52659
1 changed files with 3 additions and 3 deletions
|
|
@ -302,7 +302,7 @@ Item
|
||||||
{
|
{
|
||||||
target: provider
|
target: provider
|
||||||
property: "containerStackId"
|
property: "containerStackId"
|
||||||
when: model.settable_per_extruder || (inheritStackProvider.properties.limit_to_extruder !== null && inheritStackProvider.properties.limit_to_extruder >= 0);
|
when: model.settable_per_extruder || (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0);
|
||||||
value:
|
value:
|
||||||
{
|
{
|
||||||
// Associate this binding with Cura.MachineManager.activeMachine.id in the beginning so this
|
// Associate this binding with Cura.MachineManager.activeMachine.id in the beginning so this
|
||||||
|
|
@ -315,10 +315,10 @@ Item
|
||||||
//Not settable per extruder or there only is global, so we must pick global.
|
//Not settable per extruder or there only is global, so we must pick global.
|
||||||
return contents.activeMachineId
|
return contents.activeMachineId
|
||||||
}
|
}
|
||||||
if (inheritStackProvider.properties.limit_to_extruder !== null && inheritStackProvider.properties.limit_to_extruder >= 0)
|
if (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0)
|
||||||
{
|
{
|
||||||
//We have limit_to_extruder, so pick that stack.
|
//We have limit_to_extruder, so pick that stack.
|
||||||
return Cura.ExtruderManager.extruderIds[String(inheritStackProvider.properties.limit_to_extruder)];
|
return Cura.ExtruderManager.extruderIds[inheritStackProvider.properties.limit_to_extruder];
|
||||||
}
|
}
|
||||||
if (Cura.ExtruderManager.activeExtruderStackId)
|
if (Cura.ExtruderManager.activeExtruderStackId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue