Ok, the real issue is because text property changes are triggered when _lines changes. In the code, there is few places where _lines is changed before _lines_labels, _lines_flags etc. So in order to correctly trigger all the events, we must changes first all the parameters (_lines_flags, _lines_labels) before setting the new self._lines. And it works!