mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:38:59 +08:00
Merge pull request #18262 from Ultimaker/CURA-11558-crash-opening-printer-setting
creating pyqtslot for desired functionality
This commit is contained in:
commit
a991177cfa
@ -1101,6 +1101,10 @@ class CuraApplication(QtApplication):
|
|||||||
self._object_manager = ObjectsModel(self)
|
self._object_manager = ObjectsModel(self)
|
||||||
return self._object_manager
|
return self._object_manager
|
||||||
|
|
||||||
|
@pyqtSlot(str, result = "QVariantList")
|
||||||
|
def getSupportedActionMachineList(self, definition_id: str) -> List["MachineAction"]:
|
||||||
|
return self._machine_action_manager.getSupportedActions(self._machine_manager.getDefinitionByMachineId(definition_id))
|
||||||
|
|
||||||
@pyqtSlot(result = QObject)
|
@pyqtSlot(result = QObject)
|
||||||
def getExtrudersModel(self, *args) -> "ExtrudersModel":
|
def getExtrudersModel(self, *args) -> "ExtrudersModel":
|
||||||
if self._extruders_model is None:
|
if self._extruders_model is None:
|
||||||
|
@ -12,7 +12,6 @@ import Cura 1.0 as Cura
|
|||||||
UM.ManagementPage
|
UM.ManagementPage
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
property var machineActionManager: CuraApplication.getMachineActionManager()
|
|
||||||
Item { enabled: false; UM.I18nCatalog { id: catalog; name: "cura"} }
|
Item { enabled: false; UM.I18nCatalog { id: catalog; name: "cura"} }
|
||||||
|
|
||||||
title: catalog.i18nc("@title:tab", "Printers")
|
title: catalog.i18nc("@title:tab", "Printers")
|
||||||
@ -63,7 +62,7 @@ UM.ManagementPage
|
|||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
id: machineActionRepeater
|
id: machineActionRepeater
|
||||||
model: base.currentItem.id ? machineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null
|
model: base.currentItem ? CuraApplication.getSupportedActionMachineList(base.currentItem.id) : null
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user