mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
Added enumname while reading ucp
Added a connection in WorkspaceDialog.qml to call function whenever the 'exportedSettingModel' changes. This ensures that any changes in the model will now be reflected in the UI table. Furthermore, an added adjustment in SpecificSettingsModel.py now correctly handles the enum type settings, retrieving the correct value from the options list. CURA-11783
This commit is contained in:
parent
b34865e9c8
commit
cf61a78fbf
@ -33,6 +33,10 @@ class SpecificSettingsModel(ListModel):
|
||||
if setting_type is not None:
|
||||
# This is not very good looking, but will do for now
|
||||
value = str(SettingDefinition.settingValueToString(setting_type, value)) + " " + str(unit)
|
||||
if setting_type == "enum":
|
||||
options = stack.getProperty(setting, "options")
|
||||
value = options[stack.getProperty(setting, "value")]
|
||||
|
||||
else:
|
||||
value = str(value)
|
||||
|
||||
|
@ -216,6 +216,16 @@ UM.Dialog
|
||||
headers: ["category", "label", "value"]
|
||||
rows: manager.exportedSettingModelItems
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: manager
|
||||
function onExportedSettingModelChanged()
|
||||
{
|
||||
tableModel.clear()
|
||||
tableModel.rows = manager.exportedSettingModelItems
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user