From bf91bd2492c86adc2459cb627cb23d094767ec33 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Dec 2022 22:27:36 +0800 Subject: [PATCH] Fix double click on header --- .../Views/ProgramSetting.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 163178782..4b63d38a5 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -395,8 +395,11 @@ namespace Flow.Launcher.Plugin.Program.Views private void programSourceView_MouseDoubleClick(object sender, MouseButtonEventArgs e) { - var selectedProgramSource = programSourceView.SelectedItem as ProgramSource; - EditProgramSource(selectedProgramSource); + if (((FrameworkElement)e.OriginalSource).DataContext is ProgramSource) + { + var selectedProgramSource = programSourceView.SelectedItem as ProgramSource; + EditProgramSource(selectedProgramSource); + } } private bool IsAllItemsUserAdded(List items)