SearchResultGroup's "Hide Search Results" context menu button automatically exits the search

This commit is contained in:
yasirkula
2024-12-10 19:13:58 +03:00
parent 50ce6f56c9
commit 204de979ba
2 changed files with 8 additions and 0 deletions
@@ -816,6 +816,7 @@ namespace AssetUsageDetectorNamespace
removedRows.Add( treeViewRows[i].id );
}
treeView.ClearSearch();
treeView.HideItems( removedRows );
} );
}
@@ -200,6 +200,13 @@ namespace AssetUsageDetectorNamespace
RefreshSelectedNodes( GetSelection() );
}
public void ClearSearch()
{
string prevSearchTerm = state.searchTerm;
state.searchTerm = "";
RefreshSearch( prevSearchTerm );
}
public void RefreshSearch( string prevSearchTerm )
{
bool wasSearchTermEmpty = string.IsNullOrEmpty( prevSearchTerm );