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

fix #22615: read GuitarBend color #25943

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rettinghaus
Copy link
Contributor

Resolves: #22615

In latest develop simple GuitarBend color is written, but never read. This PR fixes this little flaw.

Copy link
Contributor

@mathesoncalum mathesoncalum left a comment

Choose a reason for hiding this comment

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

Does this solution work on your end? In this build I’m still losing the colour on save/reopen.



In principle, I think the idea with these read methods is to only read properties that “belong” to the element in question, and handle "inherited" properties by calling the reader for the element's superclass. With that in mind, I'm not sure we should be reading Pid::COLOR in this method (since it's an inherited property).

But this raises the question - why isn't the colour being read? In theory the colour should be handled by the call to TRead::readProperties(SLine*, and this approach seems to work for Glissando (another SLine subclass).

@rettinghaus rettinghaus marked this pull request as draft January 11, 2025 10:45
@rettinghaus
Copy link
Contributor Author

@mathesoncalum Yes, something strange is goging on here. And no, it was working for something on my end, but deosn't any longer …
Have a look at my test file:

guitar.zip

The color is written as direct child for GuitarBendType 0, 1, and 3, but not for type 2, although it should.

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.

GuitarBend color not saved
2 participants