Merge pull request #144 from jfhenriques/master

Fix condition error in view.py when using invert=true
This commit is contained in:
Jayofelony
2024-04-26 19:06:09 +02:00
committed by GitHub

View File

@ -109,7 +109,7 @@ class View(object):
self._state.has_element(key) self._state.has_element(key)
def add_element(self, key, elem): def add_element(self, key, elem):
if self.invert is 1 and elem.color: if self.invert is 1 and hasattr(elem, 'color'):
if elem.color == 0xff: if elem.color == 0xff:
elem.color = 0x00 elem.color = 0x00
elif elem.color == 0x00: elif elem.color == 0x00: