Fixed EvCell behaviour mentioned in #1410
This commit is contained in:
parent
b737c209b1
commit
7c7ec3736f
1 changed files with 7 additions and 3 deletions
|
|
@ -525,10 +525,14 @@ class EvCell(object):
|
||||||
# don't allow too high cells
|
# don't allow too high cells
|
||||||
excess = len(adjusted_data) - self.height
|
excess = len(adjusted_data) - self.height
|
||||||
if excess > 0:
|
if excess > 0:
|
||||||
# too many lines. Crop and mark last line with ...
|
# too many lines. Crop and mark last line with crop_string
|
||||||
|
crop_string = self.crop_string
|
||||||
adjusted_data = adjusted_data[:-excess]
|
adjusted_data = adjusted_data[:-excess]
|
||||||
if len(adjusted_data[-1]) > 3:
|
crop_string_length = len(crop_string)
|
||||||
adjusted_data[-1] = adjusted_data[-1][:-2] + ".."
|
if len(adjusted_data[-1]) > crop_string_length:
|
||||||
|
adjusted_data[-1] = adjusted_data[-1][:-crop_string_length] + crop_string
|
||||||
|
else:
|
||||||
|
adjusted_data[-1] += crop_string
|
||||||
elif excess < 0:
|
elif excess < 0:
|
||||||
# too few lines. Fill to height.
|
# too few lines. Fill to height.
|
||||||
adjusted_data.extend(["" for _ in range(excess)])
|
adjusted_data.extend(["" for _ in range(excess)])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue