feat(37): expose the all-scenes factory reset
App Settings now offers a clearly described all-scenes reset. It is disabled while live or recording and reloads the restored layout immediately. The integration test drives the real VM command and checks the Settings binding. 614 tests green, clean build with 0 warnings. Reference: OBS Scene Collections are a distinct saved set of scenes and sources: https://obsproject.com/kb/scene-collections
This commit is contained in:
@@ -191,6 +191,8 @@ public partial class MainViewModel : ViewModelBase
|
||||
public ICommand AddMediaCommand { get; }
|
||||
/// <summary>TASK 65: add the replay layer to the staged scene.</summary>
|
||||
public ICommand AddReplayLayerCommand { get; }
|
||||
/// <summary>TASK 37: replace the current scene set with its factory snapshot.</summary>
|
||||
public ICommand RestoreAllLayoutDefaultsCommand { get; }
|
||||
public ICommand ChangeMediaFileCommand { get; }
|
||||
/// <summary>Accepts the detector's green/blue-screen offer on a clip (TASK 64).</summary>
|
||||
public ICommand AcceptChromaSuggestionCommand { get; }
|
||||
@@ -271,6 +273,8 @@ public partial class MainViewModel : ViewModelBase
|
||||
AddImageCommand = new RelayCommand(_ => AddImage());
|
||||
AddMediaCommand = new RelayCommand(_ => AddMedia());
|
||||
AddReplayLayerCommand = new RelayCommand(_ => AddReplayLayer());
|
||||
RestoreAllLayoutDefaultsCommand = new RelayCommand(_ => RestoreAllLayoutDefaults(),
|
||||
_ => IsOffline && !IsRecording);
|
||||
ChangeMediaFileCommand = new RelayCommand(
|
||||
element => ChangeMediaFile(element as Source),
|
||||
element => element is Source { IsMediaSource: true });
|
||||
@@ -632,6 +636,12 @@ public partial class MainViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
private void RestoreAllLayoutDefaults()
|
||||
{
|
||||
if (!IsOffline || IsRecording || !_layoutStore.RestoreAllDefaults()) return;
|
||||
LoadLayout();
|
||||
}
|
||||
|
||||
private void ScheduleSave()
|
||||
{
|
||||
if (_isLoading || _saveDebounce == null) return;
|
||||
|
||||
Reference in New Issue
Block a user