Fix: add IsAlertBox virtual on SceneElement and override on Source

The Stream Alerts properties panel was incorrectly showing for the webcam
layer (a WebcamSceneConfig is not a Source) because IsAlertBox only existed
on Source, causing WPF binding to be treated as false-but-invisible context
or the trigger to bind against the wrong type. Adding a virtual IsAlertBox
to the base SceneElement (default false) and overriding on Source prevents
the UI block from rendering under webcam selection. Scope: Models/SceneElement.cs, Models/Source.cs, ytLive.Tests/AlertBoxPreviewVisibilityTests.cs. Build/test: app + 4 alert-box tests pass, other failures unrelated (float precision).
This commit is contained in:
2026-10-05 13:26:12 -07:00
parent 9d04aea55b
commit a8e3954f01
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -77,6 +77,9 @@ public abstract class SceneElement : INotifyPropertyChanged
/// <summary>True only for Countdown-type sources. Gates timer properties panel.</summary>
public virtual bool IsCountdown => false;
/// <summary>True only for AlertBox-type sources. Gates stream alerts properties panel.</summary>
public virtual bool IsAlertBox => false;
public virtual bool IsBackground { get; set; }
private bool _useDefaultBackground = true;