Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not rebuild contents when UWT table is updated #2305

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

blabber
Copy link
Collaborator

@blabber blabber commented Jun 21, 2024

A timer triggers a periodic update of the UWT table in the unit view. Each update clears the current contents of the table and rebuilds it from scratch. As a result, the list loses its scrolling state and scrolls back up.

This PR changes the behavior to update existing entries and only selectively delete and add entries as needed.

To match units to their entries in the table, a hidden id column has been added to the UWT table.

Closes #2296

A timer triggers a periodic update of the UWT table in the unit view.
Each update clears the current contents of the table and rebuilds it
from scratch. As a result, the list loses its scrolling state and
scrolls back up.

This commit changes the behavior to update existing entries and only
selectively delete and add entries as needed.

To match units to their entries in the table, a hidden id column has
been added to the UWT table.
@blabber blabber requested a review from jwrober June 21, 2024 19:12
@jwrober
Copy link
Collaborator

jwrober commented Jun 21, 2024

Interesting approach. I'll give it a test.

@blabber
Copy link
Collaborator Author

blabber commented Jun 22, 2024

Re-reading my diff, I noticed that I named the new variables using camelCase (the style we are using at my day job), this doesn't follow the style used in the existing code.

I will push an update later today to change these to snake_case, but this will be a purely cosmetic change.

No functional changes.
@hugomflavio
Copy link
Contributor

Tested #2305. UWT table scrolls nicely without rushing back up.

image

@jwrober jwrober merged commit aff570d into longturn:master Jun 29, 2024
22 checks passed
@blabber blabber deleted the bugfix/uwt_table_scroll_position branch June 29, 2024 16:07
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.

UWT table on Units view doesn't allow you to scroll down
3 participants