fix: chatbox properties panel showing when webcam is selected
SceneElement was missing virtual IsChatBox property (unlike IsWebcam, IsWebSource, IsImageSource). WPF binding failed silently when SelectedElement was a webcam, defaulting StackPanel to Visible. Added virtual bool IsChatBox => false on SceneElement, made Source.IsChatBox override it.
This commit is contained in:
@@ -56,6 +56,9 @@ public abstract class SceneElement : INotifyPropertyChanged
|
|||||||
/// <summary>True only for image sources — the raw preview renderer's discriminator.</summary>
|
/// <summary>True only for image sources — the raw preview renderer's discriminator.</summary>
|
||||||
public virtual bool IsImageSource => false;
|
public virtual bool IsImageSource => false;
|
||||||
|
|
||||||
|
/// <summary>True only for ChatBox-type sources. Gates chat overlay properties panel.</summary>
|
||||||
|
public virtual bool IsChatBox => false;
|
||||||
|
|
||||||
private bool _isVisible = true;
|
private bool _isVisible = true;
|
||||||
public bool IsVisible { get => _isVisible; set => Set(ref _isVisible, value); }
|
public bool IsVisible { get => _isVisible; set => Set(ref _isVisible, value); }
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -182,7 +182,7 @@ public class Source : SceneElement
|
|||||||
set => Set(ref _chatFadeSeconds, Math.Clamp(value, 0, 60));
|
set => Set(ref _chatFadeSeconds, Math.Clamp(value, 0, 60));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsChatBox => Type == SourceType.ChatBox;
|
public override bool IsChatBox => Type == SourceType.ChatBox;
|
||||||
|
|
||||||
private bool _chatPreviewEnabled = true;
|
private bool _chatPreviewEnabled = true;
|
||||||
public bool ChatPreviewEnabled
|
public bool ChatPreviewEnabled
|
||||||
|
|||||||
Reference in New Issue
Block a user