mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 11:59:02 +08:00
Use the right stack to retrieve infill values in Recommended mode
CURA-3932
This commit is contained in:
parent
7cb8e675cf
commit
b274f63df0
@ -65,10 +65,10 @@ Item
|
|||||||
id: infillListView
|
id: infillListView
|
||||||
property int activeIndex:
|
property int activeIndex:
|
||||||
{
|
{
|
||||||
var density = parseInt(infillDensity.properties.value);
|
|
||||||
var steps = parseInt(infillSteps.properties.value);
|
|
||||||
for(var i = 0; i < infillModel.count; ++i)
|
for(var i = 0; i < infillModel.count; ++i)
|
||||||
{
|
{
|
||||||
|
var density = parseInt(infillDensity.properties.value);
|
||||||
|
var steps = parseInt(infillSteps.properties.value);
|
||||||
if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax && steps > infillModel.get(i).stepsMin && steps <= infillModel.get(i).stepsMax)
|
if(density > infillModel.get(i).percentageMin && density <= infillModel.get(i).percentageMax && steps > infillModel.get(i).stepsMin && steps <= infillModel.get(i).stepsMax)
|
||||||
{
|
{
|
||||||
return i;
|
return i;
|
||||||
@ -521,6 +521,41 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UM.SettingPropertyProvider
|
||||||
|
{
|
||||||
|
id: infillExtruderNumber
|
||||||
|
|
||||||
|
containerStackId: Cura.MachineManager.activeStackId
|
||||||
|
key: "infill_extruder_nr"
|
||||||
|
watchedProperties: [ "value" ]
|
||||||
|
storeIndex: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Binding
|
||||||
|
{
|
||||||
|
target: infillDensity
|
||||||
|
property: "containerStackId"
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
var activeMachineId = Cura.MachineManager.activeMachineId;
|
||||||
|
if (machineExtruderCount.properties.value > 1)
|
||||||
|
{
|
||||||
|
var infillExtruderNr = parseInt(infillExtruderNumber.properties.value);
|
||||||
|
if (infillExtruderNr >= 0)
|
||||||
|
{
|
||||||
|
activeMachineId = ExtruderManager.extruderIds[infillExtruderNumber.properties.value];
|
||||||
|
}
|
||||||
|
else if (ExtruderManager.activeExtruderStackId)
|
||||||
|
{
|
||||||
|
activeMachineId = ExtruderManager.activeExtruderStackId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
infillSteps.containerStackId = activeMachineId;
|
||||||
|
return activeMachineId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UM.SettingPropertyProvider
|
UM.SettingPropertyProvider
|
||||||
{
|
{
|
||||||
id: infillDensity
|
id: infillDensity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user