mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
fixes to string matcher alg and some logging stuff
This commit is contained in:
@@ -36,14 +36,27 @@ namespace Wox.Infrastructure.UserSettings
|
||||
}
|
||||
|
||||
|
||||
private string _querySearchPrecision { get; set; } = StringMatcher.SearchPrecisionScore.Regular.ToString();
|
||||
public string QuerySearchPrecision
|
||||
internal StringMatcher.SearchPrecisionScore QuerySearchPrecision { get; private set; } = StringMatcher.SearchPrecisionScore.Regular;
|
||||
|
||||
public string QuerySearchPrecisionString
|
||||
{
|
||||
get { return _querySearchPrecision; }
|
||||
get { return QuerySearchPrecision.ToString(); }
|
||||
set
|
||||
{
|
||||
_querySearchPrecision = value;
|
||||
StringMatcher.UserSettingSearchPrecision = value;
|
||||
try
|
||||
{
|
||||
var precisionScore = (StringMatcher.SearchPrecisionScore)Enum.Parse(
|
||||
typeof(StringMatcher.SearchPrecisionScore),
|
||||
value);
|
||||
QuerySearchPrecision = precisionScore;
|
||||
StringMatcher.UserSettingSearchPrecision = (int)precisionScore;
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
// what do we do here?!
|
||||
Logger.Log.Exception(nameof(Settings), "Fail to set QuerySearchPrecision", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user