mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Fixing gap in logic where query was triggering when programatically setting text.
Updating the binding and settext both will trigger the TextChanged event on a seperate event dispatcher. For this reason we dynamically detect which eventhandler is most approapriate on the textchanging event.
This commit is contained in:
@@ -236,16 +236,15 @@ namespace Wox.ViewModel
|
||||
/// <param name="requery">Optional Parameter that if true, will automatically execute a query against the updated text</param>
|
||||
public void ChangeQueryText(string queryText, bool requery=false)
|
||||
{
|
||||
QueryTextUpdateBySystem = true;
|
||||
QueryText = queryText;
|
||||
|
||||
SystemQueryText = queryText;
|
||||
|
||||
if(requery)
|
||||
{
|
||||
Query();
|
||||
QueryText = queryText;
|
||||
Query();
|
||||
}
|
||||
}
|
||||
public bool LastQuerySelected { get; set; }
|
||||
public bool QueryTextUpdateBySystem { get; set; }
|
||||
|
||||
private ResultsViewModel _selectedResults;
|
||||
private ResultsViewModel SelectedResults
|
||||
|
||||
Reference in New Issue
Block a user