Because the setName function checks if the name is equal to the previous name, but at that point the previous name doesn't exist.
Contributes to issue CURA-4243.
We shouldn't write the name or ID, who are now in the metadata.
Also we should load the name and ID properly from the file.
Contributes to issue CURA-4243.
Because their implementation changed, these would have been implemented in some other way. Instead I use the getters and setters which are inherited from the parent class and therefore are already updated.
Contributes to issue CURA-4243.
CURA-4270
Technically, this is not right. This is just to postpone a time bomb...
The XML material profile needs a setting number instead of getting it
derived from the schema version.
Otherwise we fall back to the manufacturer in the machine definition. If that fails too, we fall back to Unknown (rather than an empty string).
Contributes to issue CURA-4157.
CURA-3975
This is a temporary fix to make materials work with 2.7 version upgrade
because of the setting_version change from 1 to 2. This MUST be fixed
after we have decided on how to determine the versions of an
XMLMaterialProfile.
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.
1.2 and lower didn't specify a version number. Assume that it was 1.2. We feed this through our translation function for form, mostly, because we know that the setting_version should be 0 then.
Contributes to issue CURA-3427.
The density is already put in the 'properties' metadata entry. Don't need to put it in there doubly. Turns out that this density line was originally just superfluous.
Contributes to issue CURA-3427 or something.
The setting_version is translated from the version number. The setting_version number currently happens to be the same as the version number of XML but that won't always be the case so we introduce a translation-step as well.
Contributes to issue CURA-3427.
That density variable was never used. Hope this fixes some unaccounted-for bug.
Doesn't contribute to CURA-3427 but I'm listing it as if it does anyway.