mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix item can't be unselected after editing Location
This commit is contained in:
parent
cca10ca5a0
commit
1990226c71
1 changed files with 5 additions and 0 deletions
|
|
@ -174,6 +174,10 @@ namespace Flow.Launcher.Plugin.Program.Views
|
|||
{
|
||||
var vm = new AddProgramSourceViewModel(context, _settings, selectedProgramSource);
|
||||
var add = new AddProgramSource(vm);
|
||||
int selectedIndex = programSourceView.SelectedIndex;
|
||||
// https://stackoverflow.com/questions/16789360/wpf-listbox-items-with-changing-hashcode
|
||||
// Or it can't be unselected after changing Location
|
||||
programSourceView.UnselectAll();
|
||||
if (add.ShowDialog() ?? false)
|
||||
{
|
||||
if (selectedProgramSource.Enabled)
|
||||
|
|
@ -188,6 +192,7 @@ namespace Flow.Launcher.Plugin.Program.Views
|
|||
}
|
||||
ReIndexing();
|
||||
}
|
||||
programSourceView.SelectedIndex = selectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue