mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Use extruderList rather than extruders to switch userChanges over
It's a bit weird that it switches the user changes over though. Won't it be a different printer type then?
This commit is contained in:
parent
33c1901070
commit
17762cb431
1 changed files with 3 additions and 5 deletions
|
@ -1286,17 +1286,15 @@ class MachineManager(QObject):
|
|||
# Keep a temporary copy of the global and per-extruder user changes and transfer them to the user changes
|
||||
# of the new machine after the new_machine becomes active.
|
||||
global_user_changes = self._global_container_stack.userChanges
|
||||
per_extruder_user_changes = {}
|
||||
for extruder_name, extruder_stack in self._global_container_stack.extruders.items():
|
||||
per_extruder_user_changes[extruder_name] = extruder_stack.userChanges
|
||||
per_extruder_user_changes = [extruder_stack.userChanges for extruder_stack in self._global_container_stack.extruderList]
|
||||
|
||||
self.setActiveMachine(new_machine.getId())
|
||||
|
||||
# Apply the global and per-extruder userChanges to the new_machine (which is of different type than the
|
||||
# previous one).
|
||||
self._global_container_stack.setUserChanges(global_user_changes)
|
||||
for extruder_name in self._global_container_stack.extruders.keys():
|
||||
self._global_container_stack.extruders[extruder_name].setUserChanges(per_extruder_user_changes[extruder_name])
|
||||
for i, user_changes in enumerate(per_extruder_user_changes):
|
||||
self._global_container_stack.extruderList[i].setUserChanges(per_extruder_user_changes[i])
|
||||
|
||||
@pyqtSlot(QObject)
|
||||
def applyRemoteConfiguration(self, configuration: PrinterConfigurationModel) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue