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

[video] fix selected item after removing version/extra #24791

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

CrystalP
Copy link
Contributor

@CrystalP CrystalP commented Mar 2, 2024

Description

The selected item member was not updated after removing a version or extra

This PR selects the first item of the list when the previously selected item doesn't exist in the list anymore after Refresh() - for example after removal of an item.

The first checks are overkill for the current needs in the context of the Remove button but make the function bulletproof for the future.

Motivation and context

Fix #24485, which affects both versions and extras.

After removal of a version or extra, the top item of the list is highlighted and appears selected, but going to the remove button again attempts to remove again the already removed item, instead of removing the new selection.

How has this been tested?

Versions/Extras Manager still opens with correct default item selected (default version or 1st extra of the list)
Back to back removals work as expected on the new selected item (top of the list).

What is the effect on users?

Remove version/extra works as expected without side effects.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

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

LGTM

@CrystalP CrystalP merged commit 8404b9f into xbmc:master Mar 3, 2024
2 checks passed
@CrystalP CrystalP deleted the fix-removedselecteditem branch March 3, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[video] Issue with extras removal
2 participants