mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 17:15:56 +08:00
Only value property events are now used
This speeds the num events up a bit, but it's still a tad to slow CURA-1585
This commit is contained in:
parent
0dece95f0f
commit
7b87143e65
@ -43,10 +43,11 @@ class MachineManagerModel(QObject):
|
||||
activeVariantChanged = pyqtSignal()
|
||||
activeQualityChanged = pyqtSignal()
|
||||
|
||||
globalPropertyChanged = pyqtSignal() # Emitted whenever a property inside global container is changed.
|
||||
globalValueChanged = pyqtSignal() # Emitted whenever a property inside global container is changed.
|
||||
|
||||
def _onGlobalPropertyChanged(self, key, property_name):
|
||||
self.globalPropertyChanged.emit()
|
||||
if property_name == "value":
|
||||
self.globalValueChanged.emit()
|
||||
|
||||
def _onGlobalContainerChanged(self):
|
||||
if self._global_container_stack:
|
||||
@ -187,7 +188,7 @@ class MachineManagerModel(QObject):
|
||||
user_settings = self._global_container_stack.getTop()
|
||||
user_settings.clear()
|
||||
|
||||
@pyqtProperty(bool, notify = globalPropertyChanged)
|
||||
@pyqtProperty(bool, notify = globalValueChanged)
|
||||
def hasUserSettings(self):
|
||||
if not self._global_container_stack:
|
||||
return
|
||||
@ -195,7 +196,7 @@ class MachineManagerModel(QObject):
|
||||
user_settings = self._global_container_stack.getTop().findInstances(**{})
|
||||
return len(user_settings) != 0
|
||||
|
||||
@pyqtProperty(bool, notify = globalPropertyChanged)
|
||||
@pyqtProperty(bool, notify = globalValueChanged)
|
||||
def isGlobalStackValid(self):
|
||||
return not self._checkStackForErrors(self._global_container_stack)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user