mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Fix updating extruder names on machine switch
The extruder name is asked from the extruder manager, so that the signal from extruder manager properly updates it once the new name is available. Contributes to issue CURA-3161.
This commit is contained in:
parent
77f07bbc1d
commit
34dccfd6a6
2 changed files with 11 additions and 1 deletions
|
@ -103,6 +103,16 @@ class ExtruderManager(QObject):
|
|||
def activeExtruderIndex(self):
|
||||
return self._active_extruder_index
|
||||
|
||||
## Gets the extruder name of an extruder of the currently active machine.
|
||||
#
|
||||
# \param index The index of the extruder whose name to get.
|
||||
@pyqtSlot(int, result = str)
|
||||
def getExtruderName(self, index):
|
||||
try:
|
||||
return list(self.getActiveExtruderStacks())[index].getName()
|
||||
except IndexError:
|
||||
return ""
|
||||
|
||||
def getActiveExtruderStack(self):
|
||||
global_container_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue