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

Rework how the units view is updated #2400

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

blabber
Copy link
Collaborator

@blabber blabber commented Sep 30, 2024

The logic to update the units table has been moved into a dedicated method and has been adapted in a way, that the content of the units table is not regenerated on update. Instead the already existing table contents are updated as needed. This allows the table to keep its selection on update.

If the units view is reopened after it has already been opened once, this newly created method is called to update the units table.

Fixes #2399.

This commit moves the logic to update the units table into a dedicated
method and adapts the code in a way, that the content of the units
table is not regenerated on update, but the already existing table
contents are updated as needed. This allows the table to keep its
selection on update.
If the units view is reopened after it has already been opened once,
call the newly created method to update the units table.

Fixes longturn#2399.
@blabber
Copy link
Collaborator Author

blabber commented Sep 30, 2024

I will keep this as a draft, while I do some additional testing. Feel free to comment and test.

@blabber blabber changed the title Rework the how the units view is updated Rework how the units view is updated Sep 30, 2024
@jwrober
Copy link
Collaborator

jwrober commented Sep 30, 2024

Something tells me that this is an issue from the get-go when I originally created the new view. I'll check it out on my local.

The update of the buttons in the units view was triggered by a
selection change in the units table. As the update of the units table
no longer recreates its contents from scratch and the table therefore
no longer loses its seletion, the buttons have to be updated
explicitely after the update.
@blabber
Copy link
Collaborator Author

blabber commented Oct 2, 2024

I fixed the one issue I noticed while testing locally, this should be ready for review.

@blabber blabber marked this pull request as ready for review October 2, 2024 19:21
@blabber blabber requested a review from jwrober October 2, 2024 19:21
Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jwrober jwrober merged commit a53ec21 into longturn:master Oct 2, 2024
21 checks passed
@blabber blabber deleted the bugfix/units_view_update branch October 3, 2024 03:08
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.

Units view is not updated after the first opening
2 participants