Since machine_extruders contains only the extruder stacks (not the global stack) but profile_index counts through all stacks including the global stack, we need to increase the length of machine_extruders by 1 when comparing.
I also swapped the comparison around since I think it's more logical this way around.
Contributes to issue CURA-4738.
CURA-4708
- Create definition_changes container for the newly created
ExtruderStacks.
- Move extruder-specific definition_changes settings from the machine's
container to the extruder's container
CURA-4705
- Do not set a "secret" property in the SceneNode to indicate whether a
node is a non-printing-mesh because SceneNode will not copy that
property during a deepcopy. Store it in the SettingOverrideDecorator
and make it accessible through a decorator call
- Try to trigger an auto-slice AFTER the non-printing-meshes flag is
updated, not before.
This had the documentation that it should edit the profiles returned by LegacyProfileReader. Instead, just return correct profiles from the reader...
Contributes to issue CURA-4715.
When you import a multi-extrusion file into a single-extrusion printer, don't crash but simply ignore the additional stacks.
Contributes to issue CURA-4715.
CURA-4713
Now the machines are not all loaded in the beginning, so the old way of
adding extruder stacks for old single-extrusion machines don't work.
With this fix, it now happens whenever a global stack is added to the
registry.
It seemed that:
- MachineManager was not connected to all the correct signals
- After connecting to the correct signal, ProfilesModel was not yet updated when looping over it in SidebarSimple
Because ProfilesModel's constructor already requests the MachineManager, we cannot do connect itemsChanged the way around as well.
CURA-4707
When you make the ID of the subprofile unique it doesn't get linked to the base profile any more since the '#2' gets put at the end.
Contributes to issue CURA-4243.
The original was based on reading the original file back, but that won't work if the files are provided by an arbitrary container provider. Instead we'll actually make a copy of all the profiles that need to be copied. It's much faster as well.
Contributes to issue CURA-4243.