From b696a4f77da0b313830e87ce720c3724b4ecff3a Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Mon, 18 May 2026 15:58:30 -0400 Subject: [PATCH] Clean up two warnings from PR #336 - Replace deprecated DataGridRow.GetIndex() with the Index property - Remove dead _suppressGridSelectionEvent field; the suppression was only needed for the old ItemsSource-reset highlight path, which was refactored away Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Controls/QueryStoreHistoryControl.axaml.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml.cs b/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml.cs index cdc6134..b674825 100644 --- a/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml.cs +++ b/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml.cs @@ -47,7 +47,6 @@ public partial class QueryStoreHistoryControl : UserControl // Legend state private bool _legendExpanded; - private bool _suppressGridSelectionEvent; private bool _isLoadingPlan; private string _dataSummaryText = ""; @@ -793,7 +792,7 @@ private void HighlightGridRows() // (which would wipe sort state and scroll position) foreach (var row in HistoryDataGrid.GetVisualDescendants().OfType()) { - var idx = row.GetIndex(); + var idx = row.Index; row.Background = _selectedRowIndices.Contains(idx) ? new SolidColorBrush(Avalonia.Media.Color.FromArgb(60, 79, 195, 247)) : Brushes.Transparent; @@ -829,8 +828,6 @@ private void OnHighlightLoadingRow(object? sender, DataGridRowEventArgs e) private void HistoryDataGrid_SelectionChanged(object? sender, SelectionChangedEventArgs e) { - if (_suppressGridSelectionEvent) return; - _selectedRowIndices.Clear(); if (HistoryDataGrid.SelectedItems != null) {