-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 308242: Elements that need fixing with Staff Type Changes #6376
Fix 308242: Elements that need fixing with Staff Type Changes #6376
Conversation
155f765
to
2b4175b
Compare
tie->setTick(note->chord()->segment()->tick()); | ||
tie->setTicks(nnote->chord()->segment()->tick() - note->chord()->segment()->tick()); | ||
tie->setTick(note->chord()->segment()->tick()); | ||
tie->setTicks(nnote->chord()->segment()->tick() - note->chord()->segment()->tick()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just indented these two lines, but - innocent question: why can't we just tie->setTick(note->tick()) ?
libmscore/lyrics.cpp
Outdated
@@ -384,6 +384,8 @@ void Lyrics::layout2(int nAbove) | |||
|
|||
if (placeBelow()) { | |||
qreal yo = segment()->measure()->system()->staff(staffIdx())->bbox().height(); | |||
//TODO: get real height from staffType(tick)- for staff changes (but involves autoplace decisions) | |||
// if (staffType()) { yo = staffType()->lines() * staffType()->lineDistance().val); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some places on the code that compute positions and autoplacing from the unchanged staff height boundaries. This could be adapted to the real staffType(tick) boundaries but that would be a separate PR.
qreal stYOffset = ss->staffType(p.segment->tick())->yoffset().val(); | ||
qreal lineDist = ss->staffType(p.segment->tick())->lineDistance().val(); | ||
p.line -= stepOffset + 2 * stYOffset / lineDist; | ||
|
||
if (score->inputState().usingNoteEntryMethod(NoteEntryMethod::REPITCH) && !isTablature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code recalculates the click position on a modified staff so the note is added to the intended (clicked) line or space. (Testing for any other input method that implies clicking or could be affected by this code.)
2b4175b
to
9fe3ea6
Compare
9fe3ea6
to
243f952
Compare
2b0f82d
to
dae5e11
Compare
dae5e11
to
c578328
Compare
c578328
to
ae7d3b5
Compare
…ff Type Changes
Resolves: https://musescore.org/en/node/308242
https://musescore.org/en/node/290157
and https://musescore.org/en/node/307905
This PR fixes a number of issues with some elements and Staff Type Changes. (Most of the fixes required just adjusting the vertical position to the right staffType yOffset and stepOffset.)
Before:


After:
Ledger Lines
Slurs
Ties
Before the fix:

Clefs
Key Signatures
Repeat barlines
Line
text line
Text
Before the fix:

Click note entry
Grace Notes
Lyrics
Compute Up/down:
Additional notes (for a future PR):