mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:55:53 +08:00
Fix keeping settings visible when showing all settings
This commit is contained in:
parent
711d60e8c7
commit
7123441db8
@ -18,7 +18,6 @@ Item
|
|||||||
property Action configureSettings
|
property Action configureSettings
|
||||||
property bool findingSettings
|
property bool findingSettings
|
||||||
property bool showingAllSettings
|
property bool showingAllSettings
|
||||||
property bool inhibitSwitchToCustom: false
|
|
||||||
signal showTooltip(Item item, point location, string text)
|
signal showTooltip(Item item, point location, string text)
|
||||||
signal hideTooltip()
|
signal hideTooltip()
|
||||||
|
|
||||||
@ -559,13 +558,13 @@ Item
|
|||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
//: Settings context menu action
|
//: Settings context menu action
|
||||||
visible: !findingSettings;
|
visible: !(findingSettings || showingAllSettings);
|
||||||
text: catalog.i18nc("@action:menu", "Hide this setting");
|
text: catalog.i18nc("@action:menu", "Hide this setting");
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
definitionsModel.hide(contextMenu.key);
|
definitionsModel.hide(contextMenu.key);
|
||||||
// visible settings have changed, so we're no longer showing a preset
|
// visible settings have changed, so we're no longer showing a preset
|
||||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "")
|
if (Cura.SettingVisibilityPresetsModel.activePreset != "" && !showingAllSettings)
|
||||||
{
|
{
|
||||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||||
}
|
}
|
||||||
@ -585,7 +584,7 @@ Item
|
|||||||
return catalog.i18nc("@action:menu", "Keep this setting visible");
|
return catalog.i18nc("@action:menu", "Keep this setting visible");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visible: findingSettings;
|
visible: (findingSettings || showingAllSettings);
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
if (contextMenu.settingVisible)
|
if (contextMenu.settingVisible)
|
||||||
@ -597,7 +596,7 @@ Item
|
|||||||
definitionsModel.show(contextMenu.key);
|
definitionsModel.show(contextMenu.key);
|
||||||
}
|
}
|
||||||
// visible settings have changed, so we're no longer showing a preset
|
// visible settings have changed, so we're no longer showing a preset
|
||||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "")
|
if (Cura.SettingVisibilityPresetsModel.activePreset != "" && !showingAllSettings)
|
||||||
{
|
{
|
||||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user