mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Update method order for readability
This commit is contained in:
parent
a47ffb2288
commit
151fcfdda6
1 changed files with 16 additions and 16 deletions
|
@ -124,22 +124,6 @@ class MachineManager(QObject):
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "No variant found for printer definition %s with id %s" % (self._global_container_stack.getBottom().getId(), hotend_id))
|
Logger.log("w", "No variant found for printer definition %s with id %s" % (self._global_container_stack.getBottom().getId(), hotend_id))
|
||||||
|
|
||||||
def _autoUpdateHotends(self):
|
|
||||||
extruder_manager = ExtruderManager.getInstance()
|
|
||||||
for position in self._auto_hotends_changed:
|
|
||||||
hotend_id = self._auto_hotends_changed[position]
|
|
||||||
old_index = extruder_manager.activeExtruderIndex
|
|
||||||
|
|
||||||
if old_index != int(position):
|
|
||||||
extruder_manager.setActiveExtruderIndex(int(position))
|
|
||||||
else:
|
|
||||||
old_index = None
|
|
||||||
Logger.log("d", "Setting hotend variant of hotend %s to %s" % (position, hotend_id))
|
|
||||||
self.setActiveVariant(hotend_id)
|
|
||||||
|
|
||||||
if old_index is not None:
|
|
||||||
extruder_manager.setActiveExtruderIndex(old_index)
|
|
||||||
|
|
||||||
def _onMaterialIdChanged(self, index, material_id):
|
def _onMaterialIdChanged(self, index, material_id):
|
||||||
if not self._global_container_stack:
|
if not self._global_container_stack:
|
||||||
return
|
return
|
||||||
|
@ -189,6 +173,22 @@ class MachineManager(QObject):
|
||||||
if old_index is not None:
|
if old_index is not None:
|
||||||
extruder_manager.setActiveExtruderIndex(old_index)
|
extruder_manager.setActiveExtruderIndex(old_index)
|
||||||
|
|
||||||
|
def _autoUpdateHotends(self):
|
||||||
|
extruder_manager = ExtruderManager.getInstance()
|
||||||
|
for position in self._auto_hotends_changed:
|
||||||
|
hotend_id = self._auto_hotends_changed[position]
|
||||||
|
old_index = extruder_manager.activeExtruderIndex
|
||||||
|
|
||||||
|
if old_index != int(position):
|
||||||
|
extruder_manager.setActiveExtruderIndex(int(position))
|
||||||
|
else:
|
||||||
|
old_index = None
|
||||||
|
Logger.log("d", "Setting hotend variant of hotend %s to %s" % (position, hotend_id))
|
||||||
|
self.setActiveVariant(hotend_id)
|
||||||
|
|
||||||
|
if old_index is not None:
|
||||||
|
extruder_manager.setActiveExtruderIndex(old_index)
|
||||||
|
|
||||||
def _onGlobalContainerChanged(self):
|
def _onGlobalContainerChanged(self):
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
self._global_container_stack.nameChanged.disconnect(self._onMachineNameChanged)
|
self._global_container_stack.nameChanged.disconnect(self._onMachineNameChanged)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue