Removed duplicate fallback mechanism if quality is empty. And removed dependency on shadow administration in _current_quality_group.
Contributes to issue CURA-6600.
The stack already makes it fall through properly, so there's no need to implement the fallback again here.
The only change is that it now displays 0.1mm as default layer height if there is no quality profile active. I don't think this makes a difference since we don't show the layer height then anyway. And technically it would be more correct too.
Contributes to issue CURA-6600.
A good default.
Possible bug: If there are multiple matching quality profiles but the preferred quality profiles matches none or multiple of them, a random one is chosen. The random profile for the global stack may not match the random one for the extruder?
Contributes to issue CURA-6600.
The speed improvement didn't work.
It still doesn't seem to have a lot of effect. Maybe it's not the creating of the tree that causes this slowdown?
Contributes to issue CURA-6600.
Otherwise the dictionary ends up being filled by container ID which then causes the quality type to not be present in the dictionary, ending up with an empty list of quality groups.
Contributes to issue CURA-6600.
I hope that the machine node doesn't become a collection of functions that don't fit anywhere else, but this isn't contributing to that hope. However I still think that this is particular to a certain printer, so it's within the object-oriented programming paradigm. And it's also within the scope of the class, which is getting the available profiles. So it still sort of fits.
Contributes to issue CURA-6600.
It can't hold ContainerNodes since the quality changes are no longer nodes in any tree.
This now makes it hold metadata instead.
Contributes to issue CURA-6600.
This also fixes a crash when switching nozzles since the variant was set to a list of profiles rather than just one profile.
Contributes to issue CURA-6600.
Its function is, after all, to find the default. It should always have a default. Sometimes that will be the empty material, but so be it.
Contributes to issue CURA-6600.
No need to really implement the fallbacks any more for when there are no materials. Only for when the preferred material can't be found.
Contributes to issue CURA-6600.
You can now be assured that there is ALWAYS at least one child node, except for child nodes of intent profiles which don't exist.
Contributes to issue CURA-6600.