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:
@@ -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;
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ public class Source : SceneElement
|
||||
set => Set(ref _alertDisplayMethod, value);
|
||||
}
|
||||
|
||||
public bool IsAlertBox => Type == SourceType.AlertBox;
|
||||
public override bool IsAlertBox => Type == SourceType.AlertBox;
|
||||
|
||||
// Chat box config (TASK 3.18)
|
||||
private double _chatFontSize = 16;
|
||||
|
||||
Reference in New Issue
Block a user