From e292f0e037f559d68a5526612369f1d7d5029156 Mon Sep 17 00:00:00 2001 From: gramps Date: Wed, 19 Aug 2026 13:13:00 -0700 Subject: [PATCH] fix: seed starting backdrop on every load, not just first launch SeedStartingBackdrop() moved outside the Scenes.Count==0 guard so it fires on every startup. Existing layouts with a Background source are skipped (idempotent check). --- ViewModels/MainViewModel.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index cff7d76..ddb7d86 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -1354,8 +1354,8 @@ public class MainViewModel : ViewModelBase { foreach (var name in SceneCatalog.All) AddScene(name); - SeedStartingBackdrop(); } + SeedStartingBackdrop(); // The live backdrop belongs to Live only; a pre-policy DB may have // backdrops lingering in other scenes — drop them, then @@ -1740,6 +1740,10 @@ public class MainViewModel : ViewModelBase { try { + var starting = Scenes.FirstOrDefault(s => SceneCatalog.Is(s.Name, "Starting")); + if (starting == null) return; + if (starting.Elements.OfType().Any(s => s.Type == SourceType.Background)) return; + var uri = new Uri("pack://application:,,,/Assets/starting-backdrop.jpg", UriKind.Absolute); using var stream = Application.GetResourceStream(uri)?.Stream; if (stream == null) return; @@ -1748,8 +1752,6 @@ public class MainViewModel : ViewModelBase var bytes = ms.ToArray(); var assetId = AddAsset(bytes); if (assetId == null) return; - var starting = Scenes.FirstOrDefault(s => SceneCatalog.Is(s.Name, "Starting")); - if (starting == null) return; starting.Elements.Add(new Source { Name = "Background",