From 7e01c4564e16f154af3de3899fb2320f86d343b2 Mon Sep 17 00:00:00 2001 From: gramps Date: Thu, 20 Aug 2026 18:07:53 -0700 Subject: [PATCH] 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. --- Models/SceneElement.cs | 3 +++ Models/Source.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Models/SceneElement.cs b/Models/SceneElement.cs index d5b438d..8b196de 100644 --- a/Models/SceneElement.cs +++ b/Models/SceneElement.cs @@ -56,6 +56,9 @@ public abstract class SceneElement : INotifyPropertyChanged /// True only for image sources — the raw preview renderer's discriminator. public virtual bool IsImageSource => false; + /// True only for ChatBox-type sources. Gates chat overlay properties panel. + public virtual bool IsChatBox => false; + private bool _isVisible = true; public bool IsVisible { get => _isVisible; set => Set(ref _isVisible, value); } diff --git a/Models/Source.cs b/Models/Source.cs index 73bb98a..34feea0 100644 --- a/Models/Source.cs +++ b/Models/Source.cs @@ -182,7 +182,7 @@ public class Source : SceneElement 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; public bool ChatPreviewEnabled