use notify to update exportedSettingModel

This commit is contained in:
c.lamboo 2024-03-18 11:54:23 +01:00
parent 40bc08f482
commit a58cd69b39
3 changed files with 8 additions and 3 deletions

View file

@ -77,6 +77,7 @@ class WorkspaceDialog(QObject):
self._is_compatible_machine = False
self._allow_create_machine = True
self._exported_settings_model = SpecificSettingsModel()
self._exported_settings_model.modelChanged.connect(self.exportedSettingModelChanged.emit)
self._current_machine_pos_index = 0
self._is_ucp = False
@ -104,6 +105,7 @@ class WorkspaceDialog(QObject):
missingPackagesChanged = pyqtSignal()
isCompatibleMachineChanged = pyqtSignal()
isUcpChanged = pyqtSignal()
exportedSettingModelChanged = pyqtSignal()
@pyqtProperty(bool, notify = isPrinterGroupChanged)
def isPrinterGroup(self) -> bool:
@ -356,7 +358,7 @@ class WorkspaceDialog(QObject):
def allowCreateMachine(self):
return self._allow_create_machine
@pyqtProperty(QObject)
@pyqtProperty(QObject, notify=exportedSettingModelChanged)
def exportedSettingModel(self):
return self._exported_settings_model