fixed #713: History host filter error

This commit is contained in:
Jaex 2015-06-01 08:19:01 +03:00
parent 27f42f153f
commit 44e391d333
2 changed files with 30 additions and 20 deletions

View file

@ -112,18 +112,27 @@ private HistoryItem[] ApplyFilters(HistoryItem[] historyItems)
{
string type = cbTypeFilterSelection.Text;
result = result.Where(x => x.Type == type);
if (!string.IsNullOrEmpty(type))
{
result = result.Where(x => !string.IsNullOrEmpty(x.Type) && x.Type == type);
}
}
if (cbHostFilter.Checked)
{
string host = txtHostFilter.Text;
result = result.Where(x => x.Host.IndexOf(host, StringComparison.InvariantCultureIgnoreCase) >= 0);
if (!string.IsNullOrEmpty(host))
{
result = result.Where(x => !string.IsNullOrEmpty(x.Host) && x.Host.IndexOf(host, StringComparison.InvariantCultureIgnoreCase) >= 0);
}
}
if (cbFilenameFilter.Checked)
{
string filenameFilter = txtFilenameFilter.Text;
if (cbFilenameFilter.Checked && !string.IsNullOrEmpty(filenameFilter))
if (!string.IsNullOrEmpty(filenameFilter))
{
StringComparison rule = GetStringRule();
@ -144,6 +153,7 @@ private HistoryItem[] ApplyFilters(HistoryItem[] historyItems)
result = result.Where(x => x.Filename.Equals(filenameFilter, rule));
}
}
}
if (cbDateFilter.Checked)
{

View file

@ -73,6 +73,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
RESX_AutoCreateNewLanguageFiles = True
RESX_AutoCreateNewLanguageFiles = False
EndGlobalSection
EndGlobal