[reportlab-users] Bug in Table._calcPreliminaryWidths

Sergey Kirillov rushman at mail.ru
Tue Dec 5 10:06:30 EST 2006


Greetings,

There is a bug in Platypus Table._calcPreliminaryWidths which sometimes
breaks table layout. Patch follows.

--
Sergey

Index: tables.py
===================================================================
--- tables.py (revision 3002)
+++ tables.py (working copy)
@@ -593,7 +593,7 @@
style = self._cellStyles[rowNo][colNo]
new =
elementWidth(value,style)+style.leftPadding+style.rightPadding
final = max(current, new)
- current = new
+ current = final
siz = siz and self._canGetWidth(value) # irrelevant
now?
if siz:
sizeable.append(colNo)


More information about the reportlab-users mailing list