mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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:
|
def activeQualityLayerHeight(self) -> float:
|
||||||
if not self._global_container_stack:
|
if not self._global_container_stack:
|
||||||
return 0
|
return 0
|
||||||
|
if self._current_quality_changes_group:
|
||||||
quality_changes = self._global_container_stack.qualityChanges
|
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = self._global_container_stack.qualityChanges.getId())
|
||||||
if quality_changes:
|
|
||||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality_changes.getId())
|
|
||||||
if isinstance(value, SettingFunction):
|
if isinstance(value, SettingFunction):
|
||||||
value = value(self._global_container_stack)
|
value = value(self._global_container_stack)
|
||||||
return value
|
return value
|
||||||
quality = self._global_container_stack.quality
|
elif self._current_quality_group:
|
||||||
if quality:
|
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = self._global_container_stack.quality.getId())
|
||||||
value = self._global_container_stack.getRawProperty("layer_height", "value", skip_until_container = quality.getId())
|
|
||||||
if isinstance(value, SettingFunction):
|
if isinstance(value, SettingFunction):
|
||||||
value = value(self._global_container_stack)
|
value = value(self._global_container_stack)
|
||||||
return value
|
return value
|
||||||
|
return 0
|
||||||
return 0 # No quality profile.
|
|
||||||
|
|
||||||
@pyqtProperty(str, notify = activeVariantChanged)
|
@pyqtProperty(str, notify = activeVariantChanged)
|
||||||
def globalVariantName(self) -> str:
|
def globalVariantName(self) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue