There's one copy for every stack. It doesn't matter which one we take as long as they have the same name. Global is always present, even in single extrusion. Seems the most logical one to display.
Contributes to issue CURA-3935.
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
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.
* 2.6:
Error out when trying to import a profile witha quality_type we dont have
Add default for colour code of material
When trying to convert None to RGBA, log it and return a usable default
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
Another small bug I found when looking through this MachineManager code. My IDE was complaining that the preferred_material_name was not always initialised and that preferred_material was an unused variable.
Doesn't contribute to issue CURA-3803.
These may have different parameters, such as which machine and extruder they are updating the material and variant of. If we only pass the last signal on, then we're missing the update of other extruders.
Contributes to issue CURA-3803.
We know now that it must be a Cura Container Stack. This should be a bit faster, and makes the error message I was getting a bit more clear.
Contributes to issue CURA-3803.
Not just the active extruder. The non-active extruder may change when loading a project file which happened to have the same printer (so no new printer is created) and the same material and variant in the active extruder but not the same material or variant in another extruder.
Contributes to issue CURA-3803.
It may also be any other class that implements the Definition Container Interface.
Not really related to CURA-3803 but I'm putting it there anyway as I found it during that development.
Otherwise we may only change one of the extruders next time, and it'll still have the other change in this dictionary from the previous time we are syncing from the printer.
Contributes to issue CURA-3788.