mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 19:09:00 +08:00
WIP: Fix NozzleMenu QObject result type
This commit is contained in:
parent
5d4a2a7e49
commit
2d5f65a954
@ -1115,7 +1115,7 @@ class MachineManager(QObject):
|
||||
def createMachineManager():
|
||||
return MachineManager()
|
||||
|
||||
@pyqtSlot(int, result = "QVariant")
|
||||
@pyqtSlot(int, result = QObject)
|
||||
def getExtruder(self, position: int):
|
||||
if self._global_container_stack:
|
||||
return self._global_container_stack.extruders.get(str(position))
|
||||
|
@ -13,19 +13,18 @@ Menu
|
||||
title: "Nozzle"
|
||||
|
||||
property int extruderIndex: 0
|
||||
property var extruderStack: Cura.MachineManager.getExtruder(menu.extruderIndex)
|
||||
|
||||
Cura.NozzleModel
|
||||
{
|
||||
id: nozzleModel
|
||||
}
|
||||
|
||||
property var extruderStack: Cura.MachineManager.getExtruder(extruderIndex)
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onGlobalContainerChanged: {
|
||||
menu.extruderStack = Cura.MachineManager.getExtruder(extruderIndex)
|
||||
menu.extruderStack = Cura.MachineManager.getExtruder(extruderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user