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

[settings] Fix regression (setting reuse) #15015

Merged
merged 1 commit into from
Dec 11, 2018
Merged

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Dec 7, 2018

Description

This PR fixes the other known regression in addon settings introduced with the settings rework. In v17 we were able to use settings with the same id in different categories and the respective controls would stay in sync. In v18 this only works on a per-category basis. The issue is reported by @ronie here: https://forum.kodi.tv/showthread.php?tid=326633&pid=2687641#pid2687641

This PR moves the settingsId variable prior to the category detection so categories can refer to the same set.

Motivation and Context

Fix regressions for addons in Leia.

How Has This Been Tested?

Compiled and tested with the example posted in the linked thread.

Screenshots (if appropriate):

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)
  • 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

@enen92 enen92 added Type: Fix non-breaking change which fixes an issue Component: Settings v18 Leia labels Dec 7, 2018
Copy link
Member

@Montellese Montellese left a comment

Choose a reason for hiding this comment

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

The changes look sane but I don't remember all the details of the refactor.

@DaveTBlake
Copy link
Member

@enen92 since @Montellese says it looks sane then I suggest you merge this, at least it is one step to getting addon settings working in the new settings format

@enen92 enen92 added this to the Leia 18.0-rc3 milestone Dec 11, 2018
@enen92
Copy link
Member Author

enen92 commented Dec 11, 2018

Thanks @DaveTBlake, merging

@enen92 enen92 merged commit 41dde44 into xbmc:master Dec 11, 2018
@ronie ronie mentioned this pull request Jan 15, 2019
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Settings Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants