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
@@ -209,7 +209,7 @@ public partial class MainWindow : Window
|
||||
if (e.OriginalSource is not DependencyObject original) return;
|
||||
if (IsDescendantOf(original, PreviewGrid)) return;
|
||||
if (IsDescendantOf(original, SourceList)) return;
|
||||
if (IsDescendantOf(original, ElementsPanel)) return;
|
||||
if (IsDescendantOf(original, ElementsScrollViewer)) return;
|
||||
_viewModel.SelectedElement = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user