mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +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
|
public string? CurrentLayoutName
|
||||||
{
|
{
|
||||||
get => currentLayoutName ?? Layouts.FirstOrDefault()?.Name;
|
get
|
||||||
|
{
|
||||||
|
if (!Layouts.Any(l => l.Name == currentLayoutName))
|
||||||
|
{
|
||||||
|
currentLayoutName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return currentLayoutName ?? Layouts.FirstOrDefault()?.Name;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
currentLayoutName = value;
|
currentLayoutName = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user