mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
WIP: Fix NozzleMenu QObject result type
This commit is contained in:
parent
5d4a2a7e49
commit
2d5f65a954
2 changed files with 3 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue