mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 05:15:54 +08:00
CURA-4606 change activeQualityLayerHeight to use self._current_quality(_changes)_group
This commit is contained in:
parent
cbeaf3b287
commit
ae00fc2a7e
@ -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…
x
Reference in New Issue
Block a user