Skip to content

Fix WTreeView loading. See #11240#199

Closed
jhnstrk wants to merge 1 commit into
emweb:masterfrom
jhnstrk:11240_lazy_loading
Closed

Fix WTreeView loading. See #11240#199
jhnstrk wants to merge 1 commit into
emweb:masterfrom
jhnstrk:11240_lazy_loading

Conversation

@jhnstrk

@jhnstrk jhnstrk commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

When rows are removed, WTreeView::modelRowsAboutToBeRemoved calls isExpandedRecursive to determine if rendered tree nodes are impacted by the removal. However, isExpandedRecursive was always returning false for the root node. This seems odd, when the root node is always expanded. This behaviour caused a bug because the removedHeight_ was not being set. This lead to the childrenHeight not being updated, and the loading isn't triggered.

Switching isExpandedRecursive to true for the root index fixes the issue ... but maybe it was intentionally set like this, but I can't see why.

@emweb

emweb commented Jan 11, 2023

Copy link
Copy Markdown
Collaborator

Thanks. Having it return false on the root index doesn't make any sense to me either.

I manually merged this with some changes (adding your description to the commit message and adding release notes), so I'm closing this PR.

Roel

@emweb emweb closed this Jan 11, 2023
@jhnstrk jhnstrk deleted the 11240_lazy_loading branch January 12, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants