mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 16:29:01 +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():
|
def createMachineManager():
|
||||||
return MachineManager()
|
return MachineManager()
|
||||||
|
|
||||||
@pyqtSlot(int, result = "QVariant")
|
@pyqtSlot(int, result = QObject)
|
||||||
def getExtruder(self, position: int):
|
def getExtruder(self, position: int):
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
return self._global_container_stack.extruders.get(str(position))
|
return self._global_container_stack.extruders.get(str(position))
|
||||||
|
@ -13,19 +13,18 @@ Menu
|
|||||||
title: "Nozzle"
|
title: "Nozzle"
|
||||||
|
|
||||||
property int extruderIndex: 0
|
property int extruderIndex: 0
|
||||||
|
property var extruderStack: Cura.MachineManager.getExtruder(menu.extruderIndex)
|
||||||
|
|
||||||
Cura.NozzleModel
|
Cura.NozzleModel
|
||||||
{
|
{
|
||||||
id: nozzleModel
|
id: nozzleModel
|
||||||
}
|
}
|
||||||
|
|
||||||
property var extruderStack: Cura.MachineManager.getExtruder(extruderIndex)
|
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Cura.MachineManager
|
target: Cura.MachineManager
|
||||||
onGlobalContainerChanged: {
|
onGlobalContainerChanged: {
|
||||||
menu.extruderStack = Cura.MachineManager.getExtruder(extruderIndex)
|
menu.extruderStack = Cura.MachineManager.getExtruder(extruderIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user