mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
CURA-4485 Activate configuration option disabled in printers within a
cluster. Just allow when there is a cluster with just one printer.
This commit is contained in:
parent
c1139c5c45
commit
6dfd04928f
@ -220,7 +220,9 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||||||
self.setPrinters(json_data)
|
self.setPrinters(json_data)
|
||||||
|
|
||||||
def materialHotendChangedMessage(self, callback):
|
def materialHotendChangedMessage(self, callback):
|
||||||
pass # Do nothing.
|
# When there is just one printer, the activate configuration option is enabled
|
||||||
|
if (self._cluster_size == 1):
|
||||||
|
super().materialHotendChangedMessage(callback = callback)
|
||||||
|
|
||||||
def _startCameraStream(self):
|
def _startCameraStream(self):
|
||||||
## Request new image
|
## Request new image
|
||||||
|
@ -115,8 +115,16 @@ 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: printerConnected
|
visible: printerConnected && !isClusterPrinter()
|
||||||
onClicked: manager.loadConfigurationFromPrinter()
|
onClicked: manager.loadConfigurationFromPrinter()
|
||||||
|
|
||||||
|
function isClusterPrinter() {
|
||||||
|
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||||
|
// This is a non cluster printer or the cluster it is just one printer
|
||||||
|
if (typeof clusterSize == "undefined" || clusterSize == 1)
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user