From: Rejean Loyer Date: Sun, 21 Feb 2016 23:23:12 +0000 (-0500) Subject: documentor: don't add the same module(s) multiple times. X-Git-Tag: 0.44.15~141 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=9556c3ce1ab64760f60f9cac04dcb1d7b056392e;p=sdk documentor: don't add the same module(s) multiple times. --- diff --git a/documentor/src/Documentor.ec b/documentor/src/Documentor.ec index b0af334..2b67f4e 100644 --- a/documentor/src/Documentor.ec +++ b/documentor/src/Documentor.ec @@ -410,14 +410,16 @@ void DocPrintType(Type type, char * string, bool printName, bool fullName) _PrintType(type, string, printName, true, fullName); } +Map modulesAdded { }; void AddComponents(Module module, bool isDll) { DataRow row = null; SubModule m; - if(module.name && (!strcmp(module.name, "ecere") || !strcmp(module.name, "ecereCOM"))) + if(module.name && (!strcmp(module.name, "ecere") || !strcmp(module.name, "ecereCOM")) && !modulesAdded["ecereCOM"]) { row = mainForm.browser.AddRow(); + modulesAdded["ecereCOM"] = true; row.SetData(null, APIPageNameSpace { name = "ecereCOM", nameSpace = &module.application.systemNameSpace }); row.tag = (int64)null; AddNameSpace(row, null, module.application.systemNameSpace, null, "", !isDll); @@ -430,9 +432,10 @@ void AddComponents(Module module, bool isDll) } // PUT MODULE DESCRIPTION HERE - if(module.name && strcmp(module.name, "ecereCOM")) + if(module.name && !modulesAdded[module.name] && strcmp(module.name, "ecereCOM")) { row = mainForm.browser.AddRow(); + modulesAdded[module.name] = true; row.SetData(null, APIPageNameSpace { name = module.name, module = module, nameSpace = &module.publicNameSpace }); row.tag = (int64)module; AddNameSpace(row, module, module.publicNameSpace, null /*module.application.systemNameSpace*/, "", !isDll); @@ -2377,6 +2380,7 @@ class MainForm : Window static char symbolsDir[MAX_LOCATION]; history.size = 0; + modulesAdded.RemoveAll(); FreeContext(globalContext); FreeExcludedSymbols(excludedSymbols);