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 setting print_sequence was not being resetted to all at once
whenever the 2nd extruder was reactivated.
This commit fixes that by explicitly resetting print_sequence
when reenabling an extruder, if it has been changed by the user.
CURA-6914
The machine manager was leading to a crash when trying to enable
the second extruder in single-extrusion printers, because the check
for the second extruder was not correctly implemented. This commit
fixes that issue by checking if the global stack has the specified
extruder. If it does not, then the function returns while logging the
issue.
CURA-7048
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.