mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:29:05 +08:00
Fix for code style checks
CURA-5456
This commit is contained in:
parent
e554adc1c8
commit
cc11e0a242
@ -95,7 +95,7 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
#
|
#
|
||||||
# \return An extruder's container stack.
|
# \return An extruder's container stack.
|
||||||
def getActiveExtruder(self):
|
def getActiveExtruder(self):
|
||||||
return self._extruder_stack.getId()
|
return None if self._extruder_stack is None else self._extruder_stack.getId()
|
||||||
|
|
||||||
## Gets the signal that emits if the active extruder changed.
|
## Gets the signal that emits if the active extruder changed.
|
||||||
#
|
#
|
||||||
@ -154,10 +154,13 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
#
|
#
|
||||||
# \param extruder_stack_id The new extruder stack to print with.
|
# \param extruder_stack_id The new extruder stack to print with.
|
||||||
def setActiveExtruder(self, extruder_stack_id):
|
def setActiveExtruder(self, extruder_stack_id):
|
||||||
if self._extruder_stack.getId() == extruder_stack_id:
|
if self._extruder_stack is None or self._extruder_stack.getId() == extruder_stack_id:
|
||||||
return
|
return
|
||||||
|
|
||||||
global_stack = Application.getInstance().getMachineManager().activeMachine
|
global_stack = Application.getInstance().getMachineManager().activeMachine
|
||||||
|
if global_stack is None:
|
||||||
|
return
|
||||||
|
|
||||||
for extruder in global_stack.extruders.values():
|
for extruder in global_stack.extruders.values():
|
||||||
if extruder.getId() == extruder_stack_id:
|
if extruder.getId() == extruder_stack_id:
|
||||||
self._extruder_stack = extruder
|
self._extruder_stack = extruder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user