Reset CurrentLayoutName if it does not match any existing layout names

This commit is contained in:
Stone_Red
2026-01-20 15:51:48 +01:00
parent 907d743c0d
commit cb8df79a5f
@@ -44,7 +44,16 @@ public class DesktopMagicSettings : INotifyPropertyChanged
public string? CurrentLayoutName
{
get => currentLayoutName ?? Layouts.FirstOrDefault()?.Name;
get
{
if (!Layouts.Any(l => l.Name == currentLayoutName))
{
currentLayoutName = null;
}
return currentLayoutName ?? Layouts.FirstOrDefault()?.Name;
}
set
{
currentLayoutName = value;