enthought / enthought/traitsui
QT4 TableEditor bug
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
I am using a tableeditor under qt4, using a lambda assigned to filter_name to filter my list.
This works fine, up until the point where I start to programmatically alter the underlying list that the editor is bound to.
The following lines in traitsui\qt4\table_editor.py seem broken:
290 filtering = len(self.factory.filters) > 0
291 if filtering:
292 self._update_filtering()
This leads to trouble down the line, in traitsui\qt4\table_model.py
297 if self._editor._filtered_cache is None:
298 return True
299 else:
300 return self._editor._filtered_cache[source_row]
Somehow my lambda does not register with self.factory.filters; the list is empty, but not none, and hilarity does not ensue, as filtered_cache fails to get updated, has an incompatible length, but is used nonetheless.
I suppose the real fix is to register the filter given by filter_ name correctly somewhere under the hood, but I lack the knowledge of the innards of this system to comment further. For now ive monkey-patched to problem, but my upcoming release to collaborators would very much appreciate a fix of this bug in a future release!
Thanks for all the great work
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.