mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Reset CurrentLayoutName if it does not match any existing layout names
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user