Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a column width related bug introduced in commit 5bc1328. #57

Merged
merged 1 commit into from Jun 14, 2012
Merged

Fix a column width related bug introduced in commit 5bc1328. #57

merged 1 commit into from Jun 14, 2012

Conversation

abravetti
Copy link
Contributor

Commit 5bc1328 introduced a bug in column width:

-            for i in range(len(newColWidths)):
-                newColWidths[i] = newColWidths[i] * quotient
+            newColWidths = [w * quotient for w in newColWidths]

While this patch may seem harmless, the result is quite shocking on table layout.

Look at this line:

         newColWidths = self._colWidths

By assigning a new list to the variable newColWidths you lose the reference with self._colWidths and it does not change...

This patch revert the offending change.

@abravetti
Copy link
Contributor Author

Sure you can do something like this:

    self._colWidths = [w * quotient for w in newColWidths]

This function need a good cleanup...

@BertrandBordage
Copy link
Contributor

Looks good to me. Sorry for having broken this.

chrisglass added a commit that referenced this pull request Jun 14, 2012
Fix a column width related bug introduced in commit 5bc1328.
@chrisglass chrisglass merged commit ac0a3a8 into xhtml2pdf:master Jun 14, 2012
@chrisglass
Copy link
Contributor

That's the problem with having to few tests :(

Thanks a lot for your fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants