Closes #1085: Fix current classname not getting set if class description has `:noindex:` set.

This commit is contained in:
Georg Brandl 2014-01-11 21:08:52 +01:00
parent d38c5cac8d
commit 7b7579765d
2 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,9 @@ Bugs fixed
* #1095: Fix print-media stylesheet being included always in the "scrolls" * #1095: Fix print-media stylesheet being included always in the "scrolls"
theme. theme.
* #1085: Fix current classname not getting set if class description has
``:noindex:`` set.
Documentation Documentation
------------- -------------

View File

@ -149,10 +149,10 @@ class ObjectDescription(Directive):
signode.clear() signode.clear()
signode += addnodes.desc_name(sig, sig) signode += addnodes.desc_name(sig, sig)
continue # we don't want an index entry here continue # we don't want an index entry here
self.names.append(name)
if not noindex and name not in self.names: if not noindex and name not in self.names:
# only add target and index entry if this is the first # only add target and index entry if this is the first
# description of the object with this name in this desc block # description of the object with this name in this desc block
self.names.append(name)
self.add_target_and_index(name, sig, signode) self.add_target_and_index(name, sig, signode)
contentnode = addnodes.desc_content() contentnode = addnodes.desc_content()