mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:59:00 +08:00
Update activeValidationState if setting validation changed
This was removed from onGlobalSettingChanged but never re-added anywhere. I've updated it to check for both the global and the active stack, since some settings modify only the global stack (such as layer height). Contributes to issue CURA-2006.
This commit is contained in:
parent
42399e82fb
commit
aefb36d1ec
@ -251,6 +251,20 @@ class MachineManager(QObject):
|
||||
self.activeQualityChanged.emit()
|
||||
|
||||
def _onPropertyChanged(self, key, property_name):
|
||||
if property_name == "validationState":
|
||||
if self._active_stack_valid:
|
||||
if self._active_container_stack.getProperty(key, "settable_per_extruder"):
|
||||
changed_validation_state = self._active_container_stack.getProperty(key, property_name)
|
||||
else:
|
||||
changed_validation_state = self._global_container_stack.getProperty(key, property_name)
|
||||
if changed_validation_state in (UM.Settings.ValidatorState.Exception, UM.Settings.ValidatorState.MaximumError, UM.Settings.ValidatorState.MinimumError):
|
||||
self._active_stack_valid = False
|
||||
self.activeValidationChanged.emit()
|
||||
else:
|
||||
if not self._checkStackForErrors(self._active_container_stack) and not self._checkStackForErrors(self._global_container_stack):
|
||||
self._active_stack_valid = True
|
||||
self.activeValidationChanged.emit()
|
||||
|
||||
self.activeStackChanged.emit()
|
||||
|
||||
@pyqtSlot(str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user