Skip to content

Commit

Permalink
Fixed problem with blank page when available height was the same needed
Browse files Browse the repository at this point in the history
  • Loading branch information
marinho committed Jul 2, 2010
1 parent 3bec7a7 commit 3bc33d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2010-07-02: Version 0.4.7-stable
--------------------------------
* Fixed problem with blank page when available height was the same needed

2010-06-29: Version 0.4.7-alpha
--------------------------------
* Implemented new generator CSV
Expand Down
2 changes: 1 addition & 1 deletion geraldo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- tests - a package with automated doc tests.
"""

VERSION = (0, 4, 7, 'alpha')
VERSION = (0, 4, 7, 'stable')

def get_version():
return '%d.%d.%d-%s'%VERSION
Expand Down
3 changes: 2 additions & 1 deletion geraldo/generators/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import random, shelve, os
from decimal import Decimal

from geraldo.utils import get_attr_value, calculate_size, memoize
from geraldo.widgets import Widget, Label, SystemField
Expand Down Expand Up @@ -407,7 +408,7 @@ def render_band(self, band, top_position=None, left_position=None,
def force_blank_page_by_height(self, height):
"""Check if the height is in client available report height and
makes a new page if necessary"""
if self.get_available_height() < height:
if Decimal(str(self.get_available_height())) < Decimal(str(height)):
self.force_new_page()
return True

Expand Down

0 comments on commit 3bc33d9

Please sign in to comment.