feat(37): keep a default layout snapshot beside the current layout
The matching-build persistence slice is in place: existing layouts are captured once as defaults, first-run factory scenes are saved and captured before the creator can edit, and same-build startup continues to load current rows. Default asset references survive current-layout saves. One integration test covers the current-layout roundtrip and immutable default. 609 tests green, clean build with 0 warnings. Reference scan: OBS stores scene collections separately from output profiles; this split keeps layout state independent in the same SQLite store: https://obsproject.com/kb/scene-collections
This commit is contained in:
@@ -514,9 +514,11 @@ public partial class MainViewModel : ViewModelBase
|
||||
private void LoadLayout()
|
||||
{
|
||||
_isLoading = true;
|
||||
var seededFactoryLayout = false;
|
||||
try
|
||||
{
|
||||
AppLog.Write("LoadLayout begin");
|
||||
_layoutStore.PrepareLayoutSnapshots(Helpers.BuildStamp.Id);
|
||||
var scenes = _layoutStore.Load();
|
||||
Scenes.Clear();
|
||||
foreach (var scene in scenes)
|
||||
@@ -526,6 +528,7 @@ public partial class MainViewModel : ViewModelBase
|
||||
{
|
||||
foreach (var name in SceneCatalog.All)
|
||||
AddScene(name);
|
||||
seededFactoryLayout = true;
|
||||
}
|
||||
ReorderScenesToCanonical();
|
||||
HealBackgrounds();
|
||||
@@ -582,6 +585,12 @@ public partial class MainViewModel : ViewModelBase
|
||||
LoadClipSettings();
|
||||
BroadcastForm.Load();
|
||||
|
||||
if (seededFactoryLayout)
|
||||
{
|
||||
SaveLayoutNow();
|
||||
_layoutStore.CaptureDefaultsIfMissing();
|
||||
}
|
||||
|
||||
ScheduleSave();
|
||||
AppLog.Write("LoadLayout end");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user