Made EvTable handle data entries with completely empty cells. Resolves #917.
This commit is contained in:
parent
0bf05a8795
commit
483263dda1
1 changed files with 4 additions and 4 deletions
|
|
@ -441,14 +441,14 @@ class EvCell(object):
|
||||||
if "width" in kwargs:
|
if "width" in kwargs:
|
||||||
width = kwargs.pop("width")
|
width = kwargs.pop("width")
|
||||||
self.width = width - self.pad_left - self.pad_right - self.border_left - self.border_right
|
self.width = width - self.pad_left - self.pad_right - self.border_left - self.border_right
|
||||||
if self.width <= 0:
|
if self.width <= 0 and self.raw_width > 0:
|
||||||
raise Exception("Cell width too small - no space for data.")
|
raise Exception("Cell width too small - no space for data.")
|
||||||
else:
|
else:
|
||||||
self.width = self.raw_width
|
self.width = self.raw_width
|
||||||
if "height" in kwargs:
|
if "height" in kwargs:
|
||||||
height = kwargs.pop("height")
|
height = kwargs.pop("height")
|
||||||
self.height = height - self.pad_top - self.pad_bottom - self.border_top - self.border_bottom
|
self.height = height - self.pad_top - self.pad_bottom - self.border_top - self.border_bottom
|
||||||
if self.height <= 0:
|
if self.height <= 0 and self.raw_height > 0:
|
||||||
raise Exception("Cell height too small - no space for data.")
|
raise Exception("Cell height too small - no space for data.")
|
||||||
else:
|
else:
|
||||||
self.height = self.raw_height
|
self.height = self.raw_height
|
||||||
|
|
@ -789,12 +789,12 @@ class EvCell(object):
|
||||||
if "width" in kwargs:
|
if "width" in kwargs:
|
||||||
width = kwargs.pop("width")
|
width = kwargs.pop("width")
|
||||||
self.width = width - self.pad_left - self.pad_right - self.border_left - self.border_right + self.trim_horizontal
|
self.width = width - self.pad_left - self.pad_right - self.border_left - self.border_right + self.trim_horizontal
|
||||||
if self.width <= 0:
|
if self.width <= 0 and self.raw_width > 0:
|
||||||
raise Exception("Cell width too small, no room for data.")
|
raise Exception("Cell width too small, no room for data.")
|
||||||
if "height" in kwargs:
|
if "height" in kwargs:
|
||||||
height = kwargs.pop("height")
|
height = kwargs.pop("height")
|
||||||
self.height = height - self.pad_top - self.pad_bottom - self.border_top - self.border_bottom + self.trim_vertical
|
self.height = height - self.pad_top - self.pad_bottom - self.border_top - self.border_bottom + self.trim_vertical
|
||||||
if self.height <= 0:
|
if self.height <= 0 and self.raw_height > 0:
|
||||||
raise Exception("Cell height too small, no room for data.")
|
raise Exception("Cell height too small, no room for data.")
|
||||||
|
|
||||||
# reformat (to new sizes, padding, header and borders)
|
# reformat (to new sizes, padding, header and borders)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue