mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Set SelectedIndex to 0 after delayed execution of plugins
This commit is contained in:
@@ -615,7 +615,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
currentCancellationToken.ThrowIfCancellationRequested();
|
currentCancellationToken.ThrowIfCancellationRequested();
|
||||||
UpdateResultsListViewAfterQuery(queryText, true);
|
UpdateResultsListViewAfterQuery(queryText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
@@ -656,7 +656,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateResultsListViewAfterQuery(string queryText, bool isDelayedInvoke = false)
|
private void UpdateResultsListViewAfterQuery(string queryText)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
@@ -669,10 +669,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
if (Results.Results.Count > 0)
|
if (Results.Results.Count > 0)
|
||||||
{
|
{
|
||||||
Results.Visibility = Visibility.Visible;
|
Results.Visibility = Visibility.Visible;
|
||||||
if (!isDelayedInvoke)
|
Results.SelectedIndex = 0;
|
||||||
{
|
|
||||||
Results.SelectedIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user