mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 15:25:02 +08:00
Clarify if using key or human-readable name
This is refering to "glass", not "Glass". According to @lipufei, "name" should denote a human readable/capitalized name. Contributes to CL-1250
This commit is contained in:
parent
0275de7f77
commit
af565aff55
@ -44,7 +44,7 @@ class PrinterOutputModel(QObject):
|
|||||||
self._printer_state = "unknown"
|
self._printer_state = "unknown"
|
||||||
self._is_preheating = False
|
self._is_preheating = False
|
||||||
self._printer_type = ""
|
self._printer_type = ""
|
||||||
self._buildplate_name = ""
|
self._buildplate = ""
|
||||||
|
|
||||||
self._printer_configuration.extruderConfigurations = [extruder.extruderConfiguration for extruder in
|
self._printer_configuration.extruderConfigurations = [extruder.extruderConfiguration for extruder in
|
||||||
self._extruders]
|
self._extruders]
|
||||||
@ -86,12 +86,12 @@ class PrinterOutputModel(QObject):
|
|||||||
|
|
||||||
@pyqtProperty(str, notify = buildplateChanged)
|
@pyqtProperty(str, notify = buildplateChanged)
|
||||||
def buildplate(self) -> str:
|
def buildplate(self) -> str:
|
||||||
return self._buildplate_name
|
return self._buildplate
|
||||||
|
|
||||||
def updateBuildplateName(self, buildplate_name: str) -> None:
|
def updateBuildplate(self, buildplate_name: str) -> None:
|
||||||
if self._buildplate_name != buildplate_name:
|
if self._buildplate != buildplate_name:
|
||||||
self._buildplate_name = buildplate_name
|
self._buildplate = buildplate_name
|
||||||
self._printer_configuration.buildplateConfiguration = self._buildplate_name
|
self._printer_configuration.buildplateConfiguration = self._buildplate
|
||||||
self.buildplateChanged.emit()
|
self.buildplateChanged.emit()
|
||||||
self.configurationChanged.emit()
|
self.configurationChanged.emit()
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class CloudClusterPrinterStatus(BaseCloudModel):
|
|||||||
# \param controller - The controller of the model.
|
# \param controller - The controller of the model.
|
||||||
def createOutputModel(self, controller: PrinterOutputController) -> PrinterOutputModel:
|
def createOutputModel(self, controller: PrinterOutputController) -> PrinterOutputModel:
|
||||||
model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version)
|
model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version)
|
||||||
model.updateBuildplateName(self.build_plate.type)
|
model.updateBuildplate(self.build_plate.type)
|
||||||
self.updateOutputModel(model)
|
self.updateOutputModel(model)
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
@ -627,7 +627,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||||||
|
|
||||||
# Do not store the build plate information that comes from connect if the current printer has not build plate information
|
# Do not store the build plate information that comes from connect if the current printer has not build plate information
|
||||||
if "build_plate" in data and machine_definition.getMetaDataEntry("has_variant_buildplates", False):
|
if "build_plate" in data and machine_definition.getMetaDataEntry("has_variant_buildplates", False):
|
||||||
printer.updateBuildplateName(data["build_plate"]["type"])
|
printer.updateBuildplate(data["build_plate"]["type"])
|
||||||
if not data["enabled"]:
|
if not data["enabled"]:
|
||||||
printer.updateState("disabled")
|
printer.updateState("disabled")
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user