mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add visibility control for settings in 3MFWriter plugin
Introduced a new property 'show_in_menu' to control the visibility of individual settings in 3MFWriter plugin. Modified 'SettingExport' class constructor to store this visibility status. Also, updated the 'SettingsExportGroup' model to filter the settings based on visibility before presenting them in the GUI. CURA-11723
This commit is contained in:
parent
d3b1294e8b
commit
6ddd96f914
4 changed files with 23 additions and 6 deletions
|
@ -117,6 +117,9 @@ class SettingsExportModel(QObject):
|
|||
is_exportable = any(key in SettingsExportModel.PER_MODEL_EXPORTABLE_SETTINGS_KEYS for key in user_keys)
|
||||
|
||||
for setting_to_export in user_keys:
|
||||
show_in_menu = True
|
||||
if setting_to_export in SettingsExportModel.PER_MODEL_EXPORTABLE_SETTINGS_KEYS:
|
||||
show_in_menu = False
|
||||
label = settings_stack.getProperty(setting_to_export, "label")
|
||||
value = settings_stack.getProperty(setting_to_export, "value")
|
||||
unit = settings_stack.getProperty(setting_to_export, "unit")
|
||||
|
@ -130,6 +133,7 @@ class SettingsExportModel(QObject):
|
|||
settings_export.append(SettingExport(setting_to_export,
|
||||
label,
|
||||
value,
|
||||
is_exportable or setting_to_export in exportable_settings))
|
||||
is_exportable or setting_to_export in exportable_settings,
|
||||
show_in_menu))
|
||||
|
||||
return settings_export
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue