Skip to content

Commit

Permalink
Bug 754606 - Double anchors when using groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Nov 1, 2015
1 parent a86fc5c commit e44780a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/memberdef.cpp
Expand Up @@ -1418,6 +1418,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
// are explicitly grouped.
if (!inGroup && m_impl->mtype==MemberType_EnumValue) return;


Definition *d=0;
ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
Expand All @@ -1444,19 +1445,21 @@ void MemberDef::writeDeclaration(OutputList &ol,

// If there is no detailed description we need to write the anchor here.
bool detailsVisible = isDetailedSectionLinkable();
if (!detailsVisible)
bool writeAnchor = (inGroup || m_impl->group==0) && // only write anchors for member that have no details and are
!detailsVisible && !m_impl->annMemb; // rendered inside the group page or are not grouped at all
if (writeAnchor)
{
QCString doxyArgs=argsString();
if (!m_impl->annMemb)
QCString doxyName=name();
if (!cname.isEmpty())
{
QCString doxyName=name();
if (!cname.isEmpty())
{
doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage()));
}
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage()));
}
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
}

if (!detailsVisible)
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex);
Expand Down Expand Up @@ -1775,7 +1778,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.endTypewriter();
}

if (!detailsVisible && !m_impl->annMemb)
if (writeAnchor)
{
ol.endDoxyAnchor(cfname,anchor());
}
Expand Down

0 comments on commit e44780a

Please sign in to comment.