mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
CURA-4606 change activeQualityLayerHeight to use self._current_quality(_changes)_group
This commit is contained in:
parent
cbeaf3b287
commit
ae00fc2a7e
1 changed files with 5 additions and 9 deletions
|
@ -472,21 +472,17 @@ class MachineManager(QObject):
|
|||
def activeQualityLayerHeight(self) -> float:
|
||||
if not self._global_container_stack:
|
||||
return 0
|
||||
|
||||
quality_changes = self._global_container_stack.qualityChanges
|
||||
if quality_changes:
|
||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality_changes.getId())
|
||||
if self._current_quality_changes_group:
|
||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = self._global_container_stack.qualityChanges.getId())
|
||||
if isinstance(value, SettingFunction):
|
||||
value = value(self._global_container_stack)
|
||||
return value
|
||||
quality = self._global_container_stack.quality
|
||||
if quality:
|
||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality.getId())
|
||||
elif self._current_quality_group:
|
||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = self._global_container_stack.quality.getId())
|
||||
if isinstance(value, SettingFunction):
|
||||
value = value(self._global_container_stack)
|
||||
return value
|
||||
|
||||
return 0 # No quality profile.
|
||||
return 0
|
||||
|
||||
@pyqtProperty(str, notify = activeVariantChanged)
|
||||
def globalVariantName(self) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue