1.1 --- a/viewer.py Sun Feb 18 00:37:57 2007 +0100
1.2 +++ b/viewer.py Sun Feb 18 00:50:52 2007 +0100
1.3 @@ -525,8 +525,7 @@
1.4 self.stream.write(symbol)
1.5 self._popup_start()
1.6 self.stream.write("<div class='invocations'>\n")
1.7 - self._invocations_list(node._left_call.active())
1.8 - self._invocations_list(node._right_call.active())
1.9 + self._invocations_list(node._left_call.active() + node._right_call.active())
1.10 self.stream.write("</div>\n")
1.11 self._popup_end()
1.12 self.stream.write("</span>\n")
1.13 @@ -910,8 +909,7 @@
1.14 def _op(self, node):
1.15 self.stream.write("<div class='invocations'>\n")
1.16 if hasattr(node, "_left_call") and hasattr(node, "_right_call"):
1.17 - self._invocations_list(node._left_call.active())
1.18 - self._invocations_list(node._right_call.active())
1.19 + self._invocations_list(node._left_call.active() + node._right_call.active())
1.20 else:
1.21 _node = node._node
1.22 if isinstance(_node, Not):
1.23 @@ -929,15 +927,29 @@
1.24 for node in nodes:
1.25 if hasattr(node, "invocations"):
1.26 invocations += node.invocations
1.27 - for invocation in unique(invocations):
1.28 +
1.29 + # Record each link, avoiding duplicates.
1.30 +
1.31 + links = {}
1.32 + for invocation in invocations:
1.33 fn = getattr(invocation, "copy_of", invocation).full_name()
1.34 module = invocation.module.name
1.35 name = invocation.name
1.36 structures = [x.name for x in invocation.structures]
1.37 qualified_name = ".".join([module] + structures + [name])
1.38 +
1.39 + # Record the label and the link texts.
1.40 +
1.41 + label = self._text(qualified_name)
1.42 + link = (self._url(module), self._url(fn))
1.43 + links[label] = link
1.44 +
1.45 + # Produce the list.
1.46 +
1.47 + for label, link in links.items():
1.48 self.stream.write("<div class='invocation'>")
1.49 - self.stream.write("<a href='%s.html#%s'>" % (self._url(module), self._url(fn)))
1.50 - self.stream.write(self._text(qualified_name))
1.51 + self.stream.write("<a href='%s.html#%s'>" % link)
1.52 + self.stream.write(label)
1.53 self.stream.write("</a>")
1.54 self.stream.write("</div>\n")
1.55