BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

BUG: double click pager ">" button resets page offset to 0 #70

Closed prjemian closed 1 year ago

prjemian commented 1 year ago

Same for the < button. Seems to happen when the button is pressed a second time before the table is fully drawn. Was not seeing this before today, not sure I paid any attention to it, though.

prjemian commented 1 year ago

This is a weird one. Set this sentry print:

    def catalog(self):
        print(f"catalog() {len(self._data)=} {self._data=}")
        return self._data

When the program is run, this output appears:

action='next' kwargs={}
model.pageOffset()=5
doPager action ='next', value =None
catalog() len(self._data)=133 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
len(catalog)=133 offset=5  size=5
catalog() len(self._data)=133 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
self.pageOffset()=10 self.pageSize()=5
catalog() len(self._data)=133 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=133 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=133 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
catalog() len(self._data)=1 self._data=<Node {'77819d1d-5512-4df7-b97a-9ba572c51211', ...} ~133 entries>
...

The object is changing its apparent length. Let's try keeping track of the catalog length from setCatalog().