In the current fix, the quality changes that are applicable to the
machine may not have been fixed yet because they are not active at that
moment. This commit makes sure that for a single extrusion machine which
has just been updated to have an ExtruderStack, all the quality changes
containers that are applicable to this machine will be updated as well.
When trying to apply the fix for single extrusion machines by creating a
new ExtruderStack, skip the quality changes container that has already
been loaded.
Also move things that we didn't think of previously, such as extruder offsets. You can't enter them as a user in the interface if it was single-extrusion, but you could've edited the files.
Contributes to issue CURA-4708.
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
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.
CURA-4451
When importing a quality profile, it should not fail/succeed based on
which materials are activated at the moment. The imported quality
profile will be available when the user switches to a compatible
settings.
CURA-4151
The quality searching code in _configureProfile() for importing quality
profiles doesn't take into account base materials. Use the function in
QualityManager to solve this problem.
Recently we changed the empty containers such that there is only one empty container instance and it doesn't have the proper type any more. Instead we have properties on the stack that allows us to find the container with the proper type. It's faster and easier to use.
We've had a few bugs about this so I decided to update all of them to remove those for the future, except the ones in plugins/MachineSettingsAction/MachineSettingsAction.py because we have a pending pull request that fixes those. Fixing them would give merge conflicts for fieldOfView.
It doesn't really belong to CURA-4024 but I'm sticking it under that nomer anyway to get it reviewed.
CURA-3881
CuraContainerRegistry._activeMaterialId() can return an empty string
if there is no active material, and in this case, importing a custom
quality file will fail.
Rather than successfully importing the profile and then not showing
anything, we now display an error. Not the perfect solution but the
easiest for now.
Contributes to #1873