mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 14 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue