mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Use the right stack to retrieve infill values in Recommended mode
CURA-3932
This commit is contained in:
parent
cf1309c650
commit
3bc7e9012d
1 changed files with 37 additions and 2 deletions
|
@ -65,10 +65,10 @@ Item
|
|||
id: infillListView
|
||||
property int activeIndex:
|
||||
{
|
||||
var density = parseInt(infillDensity.properties.value);
|
||||
var steps = parseInt(infillSteps.properties.value);
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
id: infillDensity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue