From 1c5c783605a95521325d961440a13dbb27d70eaf Mon Sep 17 00:00:00 2001 From: Rikin Patel Date: Sat, 1 Aug 2020 13:19:58 +0530 Subject: [PATCH] SchemaSearch: Fixed duplicate schema added after every re-indexing --- src/SSMSPlusSearch/UI/SchemaSearchControlVM.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SSMSPlusSearch/UI/SchemaSearchControlVM.cs b/src/SSMSPlusSearch/UI/SchemaSearchControlVM.cs index b67021b..824de87 100644 --- a/src/SSMSPlusSearch/UI/SchemaSearchControlVM.cs +++ b/src/SSMSPlusSearch/UI/SchemaSearchControlVM.cs @@ -99,10 +99,13 @@ private void CreateMatchOnCombo() private void CreateSchemaCombo(IEnumerable schemas) { + SchemaObjectsVM.Items.Clear(); + foreach (var schema in schemas) { SchemaObjectsVM.Items.Add(new ComboCheckBoxItem() { Text = schema, IsChecked = true, Value = schema }); } + SchemaObjectsVM.SelectionChanged += ComboVM_SelectionChanged; }