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

Trill color not respected after opening score #20856

Closed
krasko78 opened this issue Jan 6, 2024 · 8 comments · Fixed by #22852
Closed

Trill color not respected after opening score #20856

krasko78 opened this issue Jan 6, 2024 · 8 comments · Fixed by #22852
Assignees
Labels
engraving P3 Priority: Low

Comments

@krasko78
Copy link
Contributor

krasko78 commented Jan 6, 2024

Issue type

Engraving bug (incorrect score rendering)

Bug description

Open the attached score. In m.29-33 the left hand has a trill with the wavy line. Upon opening the score, this is displayed in black although if you select the trill and go to Appearance in the Properties panel, you will see that the color should be #c80064 rather than black. Changing the color correctly updates on the screen, but if the score is closed and reopened, the trill is black again and the previously chosen color is still there, just not respected. Interestingly, the trill in m.19-21 does honor its color (the same for both trills in this score).
Bach - BWV 775 - Two-part Invention No.4 in D minor (copy).zip

Steps to reproduce

See the description above.

Screenshots/Screen recordings

image

MuseScore Version

4.2

Regression

I don't know

Operating system

Windows 10

Additional context

No response

@oktophonie oktophonie added the needs info More information is required before action can be taken label Jan 8, 2024
@bkunda bkunda added the P3 Priority: Low label Jan 9, 2024
@krasko78
Copy link
Contributor Author

krasko78 commented Jan 13, 2024

Allow me to try and help with this one even though it's been only a couple of days that I've been looking at MU's code. Here is my 2 cents:

  1. The problem does NOT happen with trills with segments in the file. The segments saved inside the element carry the trill color inside themselves. This explains why the trill in m.19-21 is not black.
  2. However, if all the segments of a trill have their default values, the segments are not saved to the file and are recreated on open. The problem arises from the fact that the trill color from the file ( -> ) is copied into the trill's line color (see TRead::readProperties() - line 3774) but when the segments are created their color is set from the trill's color rather than the line color (in Trill::createLineSegment() - line 259). Changing the trill color in the Properties panel correctly updates both the line color of the trill and the color of the sgments (in Trill::setProperty()). For a trill, it is the line color that gets saved in the file for a trill.
    Hope this helps. :)

krasko78 added a commit to krasko78/MuseScore that referenced this issue Jan 13, 2024
Fix musescore#20856: Fixed ignored color on trill after opening score
@zacjansheski zacjansheski removed the needs info More information is required before action can be taken label Feb 28, 2024
@miiizen
Copy link
Contributor

miiizen commented May 13, 2024

Hi @krasko78 - the fix in the linked commit looks good to me! It would be great if you could make a PR so we can merge this. Here's a link to the developer handbook with some instructions if needed. Thanks!

@oktophonie oktophonie added this to To do in 4.x SHORTLIST via automation May 14, 2024
@krasko78
Copy link
Contributor Author

@miiizen Could you do it for me instead? I have never created a pull request to master and I believe it will take me time to find out how to do it properly, accept the necessary agreements, etc. Plus I have been having some busy days lately. It is really a small change. Thanks.

@Jojo-Schmitz
Copy link
Contributor

I'll do it. If you tell me your email address, I'll credit you for it too

@krasko78
Copy link
Contributor Author

krasyo.kiryakov@gmail.com
Maybe it is a good idea to remove my comment ("// or seg->setColor(getProperty(Pid::COLOR).valuemu::draw::Color());") ?
Thanks.

@Jojo-Schmitz
Copy link
Contributor

Thanks, all done

@krasko78
Copy link
Contributor Author

Jojo, someone else is going to approve the PR, correct?

@Jojo-Schmitz
Copy link
Contributor

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engraving P3 Priority: Low
Projects
Status: One of the next releases
4.x SHORTLIST
  
To do
Development

Successfully merging a pull request may close this issue.

7 participants