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:
ryanbodrug-microsoft
2020-04-25 09:34:16 -07:00
parent 15b7b20500
commit aa79325d76
3 changed files with 52 additions and 26 deletions

View File

@@ -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