When syncing to a different printer type only the global user changes
where kept, while the per-extruder user changes were not copied at all,
since the extruder list is empty before the new machine becomes active.
This commit fixes this problem by keeping a copy of the per-extruder
user changes before the new machine (of different type) is activated.
The copied user changes are then transfered to the new global stack
after the new machine is set as active.
CURA-6127
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.
When switching printers, it would first emit the global container changed signal which connects to _onGlobalContainerChanged, then update stuff in the extruder manager, then manually call _onGlobalContainerChanged again to update some other stuff with the new data from the extruder manager. This was prohibitively expensive, so this prevents that.
Another double or triple emit of the activeExtruderChanged was removed in the extruder manager when creating the extruders for a printer: It would first set the extruder number to 0, possibly emitting the signal, then emit the signal just to be sure since the extruder itself changed (rather than just the number), and then change the extruder number to the preferred extruder, possibly again emitting a signal. Now it just sets the extruder number to the preferred extruder and always emits the signal once (either through setting the extruder number or manually afterwards).
Contributes to issue CURA-6793.
The extruders are added when changing printers anyway, and we call this change signal upon start-up. So one of them is going to do unnecessary work.
Contributes to issue CURA-6793.
Apart form it being way to agressive (and thus, slowing things down), it
also caused a re-slice to be done when a printer was connected with another printer.
We don't need to inherit from QObject if we expose the name elsewhere. This prevents having workarounds for C++ vs QML ownership, and also allows us to test this while mocking out CuraApplication.
Done during Turbo Testing and Tooling.
- Approximate diameter needed to be a string.
- GUID-tag is mostly in capitals.
- Workaround for an overload of 'get' not being called (default parameter didn't work somehow?).
part of CURA-6817