From ebbb2ca96a23951dbd82b976ace0d01470e8a9d6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 3 Nov 2018 19:05:30 +0100 Subject: issue_6594 using ingroup and anchor causes tests to disappear The determination whether or not a reference item was in a list was based on the list name and it returned the first list item id. With multiple items only the first item was found. Checking whether an item should be appended is now based on the list name and the item id. --- src/definition.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/definition.cpp b/src/definition.cpp index bd97f6d..0bd216b 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -1644,13 +1644,21 @@ void Definition::mergeRefItems(Definition *d) m_impl->xrefListItems->setAutoDelete(TRUE); } QListIterator slii(*xrefList); + QListIterator mlii(*m_impl->xrefListItems); ListItemInfo *lii; + ListItemInfo *mii; for (slii.toFirst();(lii=slii.current());++slii) { - if (_getXRefListId(lii->type)==-1) + bool found = false; + for (mlii.toFirst();(mii=mlii.current());++mlii) { - m_impl->xrefListItems->append(new ListItemInfo(*lii)); + if ((qstrcmp(lii->type,mii->type)==0) && (lii->itemId == mii->itemId)) + { + found = true; + break; + } } + if (!found) m_impl->xrefListItems->append(new ListItemInfo(*lii)); } } } -- cgit v0.12