mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Sync currently selected preset between visibility-page and -menu
This commit is contained in:
parent
4c1002bf47
commit
74fe281e1d
7 changed files with 82 additions and 61 deletions
|
@ -18,6 +18,7 @@ Item
|
|||
property Action configureSettings
|
||||
property bool findingSettings
|
||||
property bool showingAllSettings
|
||||
property bool inhibitSwitchToCustom: false
|
||||
signal showTooltip(Item item, point location, string text)
|
||||
signal hideTooltip()
|
||||
|
||||
|
@ -559,7 +560,15 @@ Item
|
|||
//: Settings context menu action
|
||||
visible: !findingSettings;
|
||||
text: catalog.i18nc("@action:menu", "Hide this setting");
|
||||
onTriggered: definitionsModel.hide(contextMenu.key);
|
||||
onTriggered:
|
||||
{
|
||||
definitionsModel.hide(contextMenu.key);
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
MenuItem
|
||||
{
|
||||
|
@ -586,6 +595,11 @@ Item
|
|||
{
|
||||
definitionsModel.show(contextMenu.key);
|
||||
}
|
||||
// visible settings have changed, so we're no longer showing a preset
|
||||
if (Cura.SettingVisibilityPresetsModel.activePreset != "")
|
||||
{
|
||||
Cura.SettingVisibilityPresetsModel.setActivePreset("custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
MenuItem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue