Some gcode has its quality definition set to, say, UM2 extended, which is _actually_ just UM2 gcode. Thus, we check if the definition in the profile matches the current machine or what it in theory should be, either one being valid. See comments in code for details.
CIRA-4946
If a gcode is sliced with default profiles, there won't be any custom
profiles to import from that gcode. In that case, we show a info message
telling the user about this instead of showing an error message.
quality definition if the printer has_machine_quality. Otherwise the
fdmprinter definition must be used as a fallback. If there is no
quality_definition then the printer definition is use.
parsing, the quality definition is taken into account instead of the
definition.
The message when importing a profile to a different machine,
now shows the expected machine and the current machine definition id.!!
CURA-4839
- Add newly created quality_changes container to ContainerRegistry
- If an extruder is created by CuraContainerRegistry, in project
loading, do not try to override extruder's quality changes.
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.