mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts: # cura/CuraApplication.py # resources/qml/Preferences/Materials/MaterialsSyncDialog.qml # resources/qml/Preferences/Materials/MaterialsView.qml
This commit is contained in:
commit
3f8907d02a
582 changed files with 8061 additions and 9724 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 Ultimaker B.V.
|
||||
# Copyright (c) 2022 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from PyQt6.QtCore import pyqtProperty, pyqtSignal, Qt
|
||||
|
@ -9,6 +9,7 @@ from UM import i18nCatalog
|
|||
from UM.Logger import Logger
|
||||
from UM.Qt.ListModel import ListModel
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
from UM.Settings.SettingFunction import SettingFunction # To format setting functions differently.
|
||||
|
||||
import os
|
||||
|
||||
|
@ -173,12 +174,22 @@ class QualitySettingsModel(ListModel):
|
|||
label = definition.label
|
||||
if self._i18n_catalog:
|
||||
label = self._i18n_catalog.i18nc(definition.key + " label", label)
|
||||
if profile_value_source == "quality_changes":
|
||||
label = f"<i>{label}</i>" # Make setting name italic if it's derived from the quality-changes profile.
|
||||
|
||||
if isinstance(profile_value, SettingFunction):
|
||||
if self._i18n_catalog:
|
||||
profile_value_display = self._i18n_catalog.i18nc("@info:status", "Calculated")
|
||||
else:
|
||||
profile_value_display = "Calculated"
|
||||
else:
|
||||
profile_value_display = "" if profile_value is None else str(profile_value)
|
||||
|
||||
items.append({
|
||||
"key": definition.key,
|
||||
"label": label,
|
||||
"unit": definition.unit,
|
||||
"profile_value": "" if profile_value is None else str(profile_value), # it is for display only
|
||||
"profile_value": profile_value_display,
|
||||
"profile_value_source": profile_value_source,
|
||||
"user_value": "" if user_value is None else str(user_value),
|
||||
"category": current_category
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue