[FancyZones][Bug Fix] Layout hotkey show bug and update file bug (#37902)

fix Layout hotkey show bug and update file bug

Co-authored-by: Zhaopeng Wang <zhaopengwang@microsoft.com>
This commit is contained in:
dreamstart
2025-03-14 00:48:21 +08:00
committed by GitHub
parent a00f56e317
commit 924898ae94
2 changed files with 7 additions and 1 deletions

View File

@@ -491,6 +491,8 @@ namespace FancyZonesEditor
App.FancyZonesEditorIO.SerializeAppliedLayouts();
App.FancyZonesEditorIO.SerializeCustomLayouts();
App.FancyZonesEditorIO.SerializeDefaultLayouts();
App.FancyZonesEditorIO.SerializeLayoutHotkeys();
App.FancyZonesEditorIO.SerializeLayoutTemplates();
}
}

View File

@@ -328,12 +328,16 @@ namespace FancyZonesEditor.Models
// Removes this Layout from the registry and the loaded CustomModels list
public void Delete()
{
var customModels = MainWindowSettingsModel.CustomModels;
if (_quickKey != -1)
{
MainWindowSettingsModel.LayoutHotkeys.FreeKey(QuickKey);
foreach (var module in customModels)
{
module.FirePropertyChanged(nameof(QuickKeysAvailable));
}
}
var customModels = MainWindowSettingsModel.CustomModels;
int i = customModels.IndexOf(this);
if (i != -1)
{