mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 13:25:53 +08:00
Allow syncing materials & printcores from the Printers preference pane
CURA-2276
This commit is contained in:
parent
98f0fd2a08
commit
f11308e74e
@ -81,6 +81,16 @@ class DiscoverUM3Action(MachineAction):
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def loadConfigurationFromPrinter(self):
|
||||||
|
machine_manager = Application.getInstance().getMachineManager()
|
||||||
|
hotendIds = machine_manager.printerOutputDevices[0].hotendIds
|
||||||
|
for index in range(len(hotendIds)):
|
||||||
|
machine_manager.printerOutputDevices[0].hotendIdChanged.emit(index, hotendIds[index])
|
||||||
|
materialIds = machine_manager.printerOutputDevices[0].materialIds
|
||||||
|
for index in range(len(materialIds)):
|
||||||
|
machine_manager.printerOutputDevices[0].materialIdChanged.emit(index, materialIds[index])
|
||||||
|
|
||||||
def _createAdditionalComponentsView(self):
|
def _createAdditionalComponentsView(self):
|
||||||
Logger.log("d", "Creating additional ui components for UM3.")
|
Logger.log("d", "Creating additional ui components for UM3.")
|
||||||
|
|
||||||
|
@ -109,7 +109,8 @@ Item
|
|||||||
{
|
{
|
||||||
tooltip: catalog.i18nc("@info:tooltip", "Load the configuration of the printer into Cura")
|
tooltip: catalog.i18nc("@info:tooltip", "Load the configuration of the printer into Cura")
|
||||||
text: catalog.i18nc("@action:button", "Activate Configuration")
|
text: catalog.i18nc("@action:button", "Activate Configuration")
|
||||||
visible: base.printerConnected && false
|
visible: base.printerConnected
|
||||||
|
onClicked: manager.loadConfigurationFromPrinter()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user