diff --git a/FasdDesktopUi/Basics/UserControls/HierarchicalSelectionControl.xaml b/FasdDesktopUi/Basics/UserControls/HierarchicalSelectionControl.xaml
index a1318b9..47ee688 100644
--- a/FasdDesktopUi/Basics/UserControls/HierarchicalSelectionControl.xaml
+++ b/FasdDesktopUi/Basics/UserControls/HierarchicalSelectionControl.xaml
@@ -30,14 +30,14 @@
BorderThickness="{TemplateBinding BorderThickness}"
Style="{StaticResource ComboBoxToggleButton}" />
-
+
itemLookup = new Dictionary();
private readonly DispatcherTimer searchDelayTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(250) };
private string lastSearchText = string.Empty;
+ private bool suppressTreeSelectionChanged;
private TextBox searchTextBox;
private TreeView treeViewControl;
@@ -82,6 +83,7 @@ namespace FasdDesktopUi.Basics.UserControls
{
if (d is HierarchicalSelectionControl control)
{
+ control.LogSelectedItemChange(e.NewValue as HierarchicalSelectionItem);
control.TryExpandToSelectedItem();
}
}
@@ -111,6 +113,7 @@ namespace FasdDesktopUi.Basics.UserControls
EnsureTemplateParts();
searchTextBox?.Focus();
searchTextBox?.SelectAll();
+ suppressTreeSelectionChanged = false;
LogEntry($"[CategoryPicker] DropDownOpened. Selected={SelectedItem?.FullPath ?? ""}");
DropDownOpened?.Invoke(this, e);
}
@@ -118,6 +121,7 @@ namespace FasdDesktopUi.Basics.UserControls
private void ComboBoxControl_DropDownClosed(object sender, EventArgs e)
{
searchDelayTimer.Stop();
+ suppressTreeSelectionChanged = false;
LogEntry("[CategoryPicker] DropDownClosed");
DropDownClosed?.Invoke(this, e);
}
@@ -138,6 +142,9 @@ namespace FasdDesktopUi.Basics.UserControls
private void TreeViewControl_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs