STAR-322: Improving configuration models interface

This commit is contained in:
Daniel Schiavini 2018-12-07 12:04:02 +01:00
parent a1c252d3a2
commit 4f82a2759a
7 changed files with 278 additions and 183 deletions

View file

@ -2,6 +2,7 @@
# Cura is released under the terms of the LGPLv3 or higher.
from typing import List
from cura.PrinterOutput.ConfigurationModel import ConfigurationModel
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
from .CloudClusterPrinterConfiguration import CloudClusterPrinterConfiguration
@ -40,5 +41,9 @@ class CloudClusterPrinter(BaseModel):
model.updateType(self.machine_variant)
model.updateState(self.status if self.enabled else "disabled")
for configuration, extruder in zip(self.configuration, model.extruders):
configuration.updateOutputModel(extruder)
for configuration, extruder_output, extruder_config in \
zip(self.configuration, model.extruders, model.printerConfiguration.extruderConfigurations):
configuration.updateOutputModel(extruder_output)
configuration.updateConfigurationModel(extruder_config)
pass