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):
if line.isSummary():
listboxline.markSummaryLine()
# XXX What is this "+ 1"?
listboxline.setSectionDepth(line.getDepth() + 1)
context = line.getContext()
if context is not None:
section_name = context.getTitleOrId() or None
else:
section_name = None
listboxline.setSectionName(section_name)
# XXX It was line.getDepth()+1 before, but
# it probably make no sense so I (seb) removed this
listboxline.setSectionDepth(line.getDepth())
# Do not get the context again, it was already computed
# in getReportSectionList
listboxline.setSectionName(line.domain_title)
listboxline.setSectionFolded(not line.isOpen())
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