Fix: Elements scrollbar click no longer deselects the selected element
The scrollbar lives inside the ScrollViewer, not the StackPanel (ElementsPanel). Window_PreviewMouseLeftButtonDown was checking IsDescendantOf against ElementsPanel, so scrollbar clicks fell through and nulled SelectedElement. Now checks ElementsScrollViewer instead. 1a of 7-issue polish batch. 207 tests, 0 warnings.
This commit is contained in:
+1
-1
@@ -366,7 +366,7 @@
|
|||||||
Visibility="{Binding SelectedElement, Converter={StaticResource NotNullToVis}}">
|
Visibility="{Binding SelectedElement, Converter={StaticResource NotNullToVis}}">
|
||||||
<TextBlock Text="ELEMENTS" Style="{StaticResource SectionHeader}" VerticalAlignment="Center"/>
|
<TextBlock Text="ELEMENTS" Style="{StaticResource SectionHeader}" VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ScrollViewer Grid.Row="7" VerticalScrollBarVisibility="Auto" Background="Transparent"
|
<ScrollViewer x:Name="ElementsScrollViewer" Grid.Row="7" VerticalScrollBarVisibility="Auto" Background="Transparent"
|
||||||
Visibility="{Binding SelectedElement, Converter={StaticResource NotNullToVis}}">
|
Visibility="{Binding SelectedElement, Converter={StaticResource NotNullToVis}}">
|
||||||
<StackPanel x:Name="ElementsPanel" Margin="0,4,0,0">
|
<StackPanel x:Name="ElementsPanel" Margin="0,4,0,0">
|
||||||
<!-- Opacity + mirror/shape (draggable elements: image, webcam) -->
|
<!-- Opacity + mirror/shape (draggable elements: image, webcam) -->
|
||||||
|
|||||||
+1
-1
@@ -209,7 +209,7 @@ public partial class MainWindow : Window
|
|||||||
if (e.OriginalSource is not DependencyObject original) return;
|
if (e.OriginalSource is not DependencyObject original) return;
|
||||||
if (IsDescendantOf(original, PreviewGrid)) return;
|
if (IsDescendantOf(original, PreviewGrid)) return;
|
||||||
if (IsDescendantOf(original, SourceList)) return;
|
if (IsDescendantOf(original, SourceList)) return;
|
||||||
if (IsDescendantOf(original, ElementsPanel)) return;
|
if (IsDescendantOf(original, ElementsScrollViewer)) return;
|
||||||
_viewModel.SelectedElement = null;
|
_viewModel.SelectedElement = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -825,6 +825,7 @@ No changes to `MusicPlayer`, the 0.20 cap, the ducker, or the meter zones. Build
|
|||||||
8. ✅ Webcam border config — color hex input + color swatch picker, border thickness 0–10 slider
|
8. ✅ Webcam border config — color hex input + color swatch picker, border thickness 0–10 slider
|
||||||
9. ✅ Countdown source — `SourceType.Countdown`, pick list (Starting/BRB scenes only), timer minutes 1–60 default 15
|
9. ✅ Countdown source — `SourceType.Countdown`, pick list (Starting/BRB scenes only), timer minutes 1–60 default 15
|
||||||
10. ✅ Web source — `SourceType.WebSource`, pick list (all scenes), URI text input
|
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`)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user