Skip to content

Commit c7c80f1

Browse files
authored
Merge pull request #1145 from rwf-rr/fix-content-manager-search-exception
Content Manager: Fix exception when searching; path was added twice to search list.
2 parents 489bb03 + 875b084 commit c7c80f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Contrib/ContentManager/ContentManagerGUI.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ void searchBox_TextChanged(object sender, EventArgs e)
286286
finds.Add(new SearchResult(content, path));
287287

288288
foreach (var child in ((ContentType[])Enum.GetValues(typeof(ContentType))).SelectMany(ct => content.Get(ct)))
289-
pending.Add(path + " / " + child.Name, child);
289+
if (!pending.ContainsKey(path + " / " + child.Name))
290+
pending.Add(path + " / " + child.Name, child);
290291

291292
foreach (var child in ContentLink.Matches(ContentInfo.GetText(content)).Cast<Match>().Select(linkMatch => content.Get(linkMatch.Groups[1].Value, (ContentType)Enum.Parse(typeof(ContentType), linkMatch.Groups[2].Value))).Where(linkContent => linkContent != null))
292293
if (!pending.ContainsKey(path + " -> " + child.Name))

0 commit comments

Comments
 (0)