Apply new overrides when switching styles if there's a common ancestor #2556
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A very simple change. When switching between styles if the new applied style inherits the old one then the exports of the old style get transferred to the new one, this PR makes this also happen when both old and new styles inherit from the same style.
The use-case, at least in our case, was that we had a different style for each character in our game, so every time the characters switched in the dialogue the whole layer was destroyed and rebuilt, causing problems with the textbox animations. So we made all the styles inherit from one base style that way when we switch between styles the exports simply change, but we had the problem that when changing from a character style to a different character style since the second style technically didn't inherit from the first one it didn't work, this PR fixes that.