The position argument metadata always be there. However if it's not (because the file is old, or manually modified, or a version upgrade worked incorrectly, or whatever) then we shouldn't crash. We just don't know how to order it correctly then. This tries to repair it as best it can.
The stacks would get marked dirty for setting some metadata, but since thats
part of their construction, they aren't really dirty.
Previously, every single stack that was loaded would be marked as dirty, which causes unneeded
saving.
When printers share the same group_id, they are removed, regardless if
they are hidden or not. This was resulting in sometimes removing
multiple printers when removing a printer that was created by a project
file.
This PR fixes that by actually checking whether the printer to be
removed is hidden.
CURA-7522
When removing a printer, the files in %appdata%/cura/<version>/
/definition_changes/ remained intact. This commit fixes that by
making sure that the definitionChanges are removed before removing
the machine.
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
The meta data entry was rename to be more representative of its
function. In addition, the bool metadata entry is now properly
handled using the parseBool function.
CURA-7438
This makes the cluster size also available when the machine is offline.
Also fixes an issue where the cluster size is improperly restored
once the internet connection comes back online, resulting in the printer
showing as a single printer until next sync
CURA-7347
Extruders is deprecated. Always use the extruderList.
In fact, the else case beneath was already using extruderList in the same way.
Hopefully we can one day get rid of all the string conversion for the position in this class. I don't dare to refactor that without having a review though.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
The extruders dictionary has been deprecated in favour of extruderList.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
This fixes a possible bug, too, if the extruders dictionary weren't iterated over in the order of the extruders. It would sometimes assign the profiles to the wrong extruders then. However I think the dictionary iteration in Python is in order of insertion and we probably insert them in the proper order by accident.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
Removes another warning from the log. And it makes the code simpler in this case.
Done during Turbo Testing and Tooling to reduce the number of warnings in our log file.
This was originally added for backwards compatibility with old versions of Uranium. However the link between Cura versions and Uranium versions is already very strong (Cura crashes with old Uranium versions) so this is not necessary.
It was also adding warnings in our log that these extruders had already been added to the printer.
Done during Turbo Testing and Tooling, to clean up our log files.