Gracefully handle the case where the machine manager is requested to
delete the last machine in Cura. In this case, instead of deleting
everything of this machine and still keep it as an active machine,
the machine manager will set the active machine to None.
The QML files which depend on the active machine were changed to
properly handle themselves when there is no active machine.
CURA-7454
Converted doxygen style comments to reStructuredText style in the files
found in Cura/cura/Model directory recursively using the script
dox_2_rst.py (provided in the Uranium repo). Comments were manually
checked and changed if needed.
Note: dox_2rst.py struggles with decorated functions.
Conflicts:
cura/Machines/MaterialManager.py -> File was deleted in Master but I changed things for the lazy loading.
cura/Machines/Models/BaseMaterialsModel.py -> I clarified documentation on a line above a place where a timer was added in between.
Contributes to issue CURA-6793.
Also fix unnecessary emitting of switching extruder tabs.
This should improve performance a lot. I tested a lot of things and am convinced that it didn't break anything. But the automated GUI tests and QA team should be the final arbiters of that...
Contributes to issue CURA-6793.
We just track it via the preference value itself rather than duplicating that in any other data structure. It's simple enough.
Contributes to issue CURA-6776.
And make all subclasses run its super _update as well to make sure that this gets updated for them. It's necessary for the _createMaterialItem functionality because it needs to add an is_favorite role.
Contributes to issue CURA-6600.
The MaterialManager.materialsUpdated signal was only called once upon init and for the rest when a favourite was added or removed. So only the FavoriteMaterialsModel would need to listen to it.
Because the MaterialManager is being deprecated, the favourite materials model now just listens to the preferences changing instead, as it was supposed to be doing anyway.
Contributes to issue CURA-6600.
If the metadata changed, such as whether a material was favourite or not, then the materials models were not updating any more because the actual list of available materials was still the same.
I've removed this optimisation and tested performance locally. It seems to be slightly slower (though that might be placebo or measurement error). However most of the performance boost of cura-6016 was resulting from different changes there so the interface still seems to be quite a lot faster than what it used to be.
Contributes to issue CURA-6032.
Did this so that models can be updated more often fixing bugs where when a material is set as "not favorite" in the favorites section, its updated accordingly in its "normal" section.
It's also the ground work for saving material section expansion to preferences.
Contributes to CURA-5378