From c77fe9ec1b7168cf7106c4f617cda266bc2b64e9 Mon Sep 17 00:00:00 2001 From: ElektroKill Date: Sat, 16 Mar 2024 11:43:46 +0100 Subject: [PATCH] Temporarily stop search from refreshing when the selected member changes fixes #307 --- dnSpy/dnSpy/Search/SearchService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dnSpy/dnSpy/Search/SearchService.cs b/dnSpy/dnSpy/Search/SearchService.cs index a1e13679fc..36ea8d37df 100644 --- a/dnSpy/dnSpy/Search/SearchService.cs +++ b/dnSpy/dnSpy/Search/SearchService.cs @@ -124,7 +124,9 @@ public IEnumerable GetGuidObjects(GuidObjectsProviderArgs args) { classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged; searchSettings.PropertyChanged += SearchSettings_PropertyChanged; documentTabService.DocumentTreeView.DocumentService.CollectionChanged += DocumentService_CollectionChanged; - documentTabService.DocumentTreeView.SelectionChanged += DocumentTreeView_SelectionChanged; + // TODO: This currently causes frequent refreshes since the SelectionChanged event gets fired twice when the selection changes. + // Once to remove the old selection and once to add the new selection. + // documentTabService.DocumentTreeView.SelectionChanged += DocumentTreeView_SelectionChanged; documentTabService.DocumentModified += DocumentTabService_FileModified; searchControl.SearchListBoxDoubleClick += (s, e) => FollowSelectedReference();