From b7ede5a0262f3840548dd4b3014b73c28dcf4e7b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 28 Apr 2020 13:30:29 +0200 Subject: [PATCH] Fixed size bug --- Calendar/DesignEntity.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Calendar/DesignEntity.py b/Calendar/DesignEntity.py index a766a79..ca0597b 100644 --- a/Calendar/DesignEntity.py +++ b/Calendar/DesignEntity.py @@ -11,9 +11,10 @@ class DesignEntity (object): def __init__(self, size, mask=False, invert_mask=False, color_key=False): self.size = size # Are dimensions >= 0? - for i in range(2): - if self.size[i] < 0: - self.size[i] = 0 + if self.size[0] < 0: + self.size = (0, self.size[1]) + if self.size[1] < 0: + self.size = (self.size[0], 0) self.pos = (0, 0) self.mask = mask