Commit 77882f91 authored by Sebastien Robin's avatar Sebastien Robin

Modify the way ListBoxListRenderer.render works :

- do not add +1 to the depth, take the depth calculated by getReportSectionList
- take the domain_title already calculated into getReportSectionList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18766 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 67fa95d8
...@@ -2255,14 +2255,12 @@ class ListBoxListRenderer(ListBoxRenderer): ...@@ -2255,14 +2255,12 @@ class ListBoxListRenderer(ListBoxRenderer):
if line.isSummary(): if line.isSummary():
listboxline.markSummaryLine() listboxline.markSummaryLine()
# XXX What is this "+ 1"? # XXX It was line.getDepth()+1 before, but
listboxline.setSectionDepth(line.getDepth() + 1) # it probably make no sense so I (seb) removed this
context = line.getContext() listboxline.setSectionDepth(line.getDepth())
if context is not None: # Do not get the context again, it was already computed
section_name = context.getTitleOrId() or None # in getReportSectionList
else: listboxline.setSectionName(line.domain_title)
section_name = None
listboxline.setSectionName(section_name)
listboxline.setSectionFolded(not line.isOpen()) listboxline.setSectionFolded(not line.isOpen())
if line.getBrain() is not None: if line.getBrain() is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment