Skip to content

Commit 25c8d3e

Browse files
committed
Fix the weirdest combobox bug
If you don't set Handled to true in the handler, the SelectionChanged event bubbles up to the parent TabControl and resets the entire graph recreating the entire tab.
1 parent f5d59fd commit 25c8d3e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/StructuredLogViewer/Controls/BuildControl.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,11 @@ private void CentralTabControl_SelectionChanged(object sender, SelectionChangedE
540540

541541
private void PopulateProjectReferenceGraph()
542542
{
543+
if (projectReferenceGraphTab.Content is GraphHostControl)
544+
{
545+
return;
546+
}
547+
543548
var graph = Build.ProjectReferenceGraph.Graph;
544549

545550
var graphHostControl = new GraphHostControl();

src/StructuredLogViewer/Controls/GraphHostControl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ private void Initialize()
336336

337337
filterModeComboBox.SelectionChanged += (s, e) =>
338338
{
339+
e.Handled = true;
339340
graphControl.FilterMode = filterModeComboBox.SelectedIndex switch
340341
{
341342
0 => GraphFilterMode.None,

0 commit comments

Comments
 (0)