mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Refactored the config models so they they function are more stand alone units.
The seperation of concern got a bit mixed up, as the printer output model was connecting the signals that the config model needed to function together. With these changes it's now also possible to use the config model as a part of a printjob, since printjobs can also have a configuration
This commit is contained in:
parent
da23eff2a6
commit
86be07b095
4 changed files with 67 additions and 57 deletions
|
@ -43,9 +43,13 @@ class PrinterOutputModel(QObject):
|
|||
self._is_preheating = False
|
||||
self._printer_type = ""
|
||||
self._buildplate_name = None
|
||||
# Update the printer configuration every time any of the extruders changes its configuration
|
||||
for extruder in self._extruders:
|
||||
extruder.extruderConfigurationChanged.connect(self._updateExtruderConfiguration)
|
||||
|
||||
|
||||
self._printer_configuration.extruderConfigurations = [extruder.extruderConfiguration for extruder in
|
||||
self._extruders]
|
||||
|
||||
#for extruder_configuration in self._printer_configuration.extruderConfigurations:
|
||||
# extruder_configuration.extruderConfigurationChanged.connect(self.configurationChanged)
|
||||
|
||||
self._camera = None
|
||||
|
||||
|
@ -284,6 +288,6 @@ class PrinterOutputModel(QObject):
|
|||
return self._printer_configuration
|
||||
return None
|
||||
|
||||
def _updateExtruderConfiguration(self):
|
||||
self._printer_configuration.extruderConfigurations = [extruder.extruderConfiguration for extruder in self._extruders]
|
||||
self.configurationChanged.emit()
|
||||
#def _updateExtruderConfiguration(self):
|
||||
|
||||
#self.configurationChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue