diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index 5817f58..76fbefc 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -105,6 +105,13 @@ public partial class MainViewModel : ViewModelBase private void OnSelectedElementPropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e) { + // ⛔ Safety net for EVERY property control: a static layer's appearance is baked into the + // scene cache keyed on element identity, so changing a property without invalidating the + // bake repaints nothing — the control looks dead. The Background toggle was the first case + // found (2026-11-01); the cause is generic, so the cure is here rather than one handler per + // property. Cheap: the bake is recomputed on demand, once. + if (StagedScene != null) _sceneGraph.InvalidateBake(StagedScene); + if (e.PropertyName == nameof(SceneElement.UseDefaultBackground)) { // ⛔ Turning the default back ON has to RE-STAMP the shipped art. Browse… writes the @@ -122,8 +129,12 @@ public partial class MainViewModel : ViewModelBase } } - if (StagedScene != null) _sceneGraph.InvalidateBake(StagedScene); + // Both surfaces: UpdateBackgroundImage drives the preview's lower layer, + // UpdateActiveBackground drives ActiveBackgroundImage (the art the preview draws above + // it). Refreshing only the first is why the thumbnails changed while the preview did + // not (creator report, 2026-11-01). UpdateBackgroundImage(); + UpdateActiveBackground(); RefreshSnapshotsAsync(); ScheduleSave(); }