The material is added multiple times to the variant nodes, and overwriting it with the eventual right one was going wrong.
This does not solve it entirely (because the less specific one still ends up selected _initially_ because it gets added first, and the order can't be guaranteed.
part of CURA-6863
This space triggers PoEdit to give a warning that the translation doesn't have the space there. That's okay, since it's a column and the space doesn't influence spacing then.
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.
This class is deprecated. Constructing it here means that the class gets constructed on the Qt thread and makes it inaccessible for the rest.
Contributes to issue CURA-6600.
This function is specific to the management page (for the most part; some things seem to call the _createQualityChanges private function nonetheless).
Contributes to issue CURA-6600.
We can reuse our duplicateMaterial function again but in a simpler way. Also finding the preferred material is simpler with our container tree.
However there seems to be a problem with finding the preferred material; it's not finding generic_pla for UM3 and AA0.4 anyway, and then falls back on a random material. This needs to be fixed in the variant node class.
Contributes to issue CURA-6600.
Just like MaterialManager used to be. There can be only one instance of the page then.
This prevents a crash when Qt deletes the QObject because it's no longer used in the page when you close the preferences screen. But when you open it again it doesn't construct a new one. Now there is always one instance so that's not a problem any more. Also it allows other pages to access this item.
Contributes to issue CURA-6600.
Just like the QualityManagementModel, this class is intended to be used as proxy for the material management page in the preferences. I'm intending to move all relevant pyqtSlots from the material manager into this one. The advantage of this switch is that the material manager had no well-bounded scope and so tended to become a big mess of all sorts of functions. This one has a clear scope: serve as a proxy for the buttons you can press in the preferences screen for materials.
Contributes to issue CURA-6600.
The onActiveMaterialChanged signal is triggered upon loading a material for the first time. This is hard to fix without breaking stuff, so we will revert this part.
This re-introduces a bug where if you change a material diameter such that the material disappears from the list, it is still selected and you can change its properties in the details panel.
Contributes to issue CURA-6679.