'Checks for pending UI updates'

def has_updates(self):

    if (self.children_changed or self.invalidated):
        return True
    if any(self.properties_dirty.values()):
        return True
    if self.visible:
        for child in self.children:
            if child.has_updates():
                return True
    return False
