Fix: URI text box no longer shows under webcam source
The web source section's visibility was bound to SelectedElement.Type via a converter, but WebcamSceneConfig has no Type property — the WPF binding path didn't resolve correctly and the section leaked through. Added IsWebSource virtual property to SceneElement (mirrors existing IsWebcam pattern), overridden in Source to return Type == SourceType.WebSource. Section visibility now binds directly to SelectedElement.IsWebSource via BoolToVis. 1c of 7-issue polish batch. 207 tests, 0 warnings.
This commit is contained in:
+1
-1
@@ -449,7 +449,7 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- Web source config -->
|
||||
<StackPanel Visibility="{Binding SelectedElement.Type, Converter={StaticResource SourceTypeToWebVis}, ConverterParameter=WebSource}" Margin="0,0,0,8">
|
||||
<StackPanel Visibility="{Binding SelectedElement.IsWebSource, Converter={StaticResource BoolToVis}}" Margin="0,0,0,8">
|
||||
<TextBlock Text="URI" Foreground="#a0a0b0" FontSize="11" Margin="0,0,0,2"/>
|
||||
<DockPanel>
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource IconButton}"
|
||||
|
||||
@@ -47,6 +47,9 @@ public abstract class SceneElement : INotifyPropertyChanged
|
||||
/// <summary>True only for singleton resources (webcam). Gates webcam-only UI.</summary>
|
||||
public virtual bool IsWebcam => false;
|
||||
|
||||
/// <summary>True only for WebSource-type elements. Gates URI input visibility.</summary>
|
||||
public virtual bool IsWebSource => false;
|
||||
|
||||
/// <summary>True for elements that can be dragged/resized in the preview (image, webcam).</summary>
|
||||
public virtual bool IsDraggable => false;
|
||||
|
||||
|
||||
@@ -38,12 +38,15 @@ public class Source : SceneElement
|
||||
{
|
||||
Raise(nameof(IsLiveCapture));
|
||||
Raise(nameof(DisplaySource));
|
||||
Raise(nameof(IsWebSource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsDraggable => Type == SourceType.Image;
|
||||
|
||||
public override bool IsWebSource => Type == SourceType.WebSource;
|
||||
|
||||
/// <summary>The permanent scene backdrop (live desktop/game capture). Never removable/reorderable.</summary>
|
||||
private bool _isBackdrop;
|
||||
public bool IsBackdrop { get => _isBackdrop; set => Set(ref _isBackdrop, value); }
|
||||
|
||||
@@ -827,7 +827,7 @@ No changes to `MusicPlayer`, the 0.20 cap, the ducker, or the meter zones. Build
|
||||
10. ✅ Web source — `SourceType.WebSource`, pick list (all scenes), URI text input
|
||||
11. ✅ Elements scrollbar deselect fix — clicking the Elements panel scrollbar no longer deselects the selected element (scrollbar lives inside the ScrollViewer, not the StackPanel; guard now checks `ElementsScrollViewer` instead of `ElementsPanel`)
|
||||
12. ✅ Web source URI + buttons inline — merged URI TextBox and check/revert buttons into a single DockPanel row (✓ rightmost, ✕ left); buttons no longer wrap to a separate line
|
||||
13. ✅ Web source URI hidden for webcam (verified) — `SourceTypeToVisibilityConverter` returns Collapsed when `SelectedElement.Type` is null (WebcamSceneConfig has no `Type` property); URI section correctly hidden
|
||||
13. ✅ Web source URI hidden for webcam — URI section was showing for webcam due to WPF binding path `SelectedElement.Type` not resolving on `WebcamSceneConfig`; replaced with `IsWebSource` virtual property on `SceneElement` (mirrors existing `IsWebcam` pattern), overridden in `Source` to return `Type == SourceType.WebSource`, bound via `BoolToVis`
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user