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 #70906 - TAB: slurs between stems not centred #2182

Merged
merged 1 commit into from Aug 26, 2015
Merged

Fix #70906 - TAB: slurs between stems not centred #2182

merged 1 commit into from Aug 26, 2015

Conversation

mgavioli
Copy link
Contributor

References: issue https://musescore.org/en/node/70906 and passim issue https://musescore.org/en/node/69846

In TABs, when slurs are placed between stems (as opposed to slurs on note head side), they are not perfectly centred.

This may happen for instance in tabs with stems beside staff and more than one voice.

__References__: issue https://musescore.org/en/node/70906 and _passim_ issue https://musescore.org/en/node/69846

In TABs, when slurs are placed between stems (as opposed to slurs on note head side), they are not perfectly centred.

This may happen for instance in tabs with stems beside staff and more than one voice.
@mgavioli
Copy link
Contributor Author

@lasconic @MarcSabatella : would you mind to double check if the notes in comments at https://github.com/musescore/MuseScore/pull/2182/files#diff-ff48206423d5b1e9b234471f81b89a53R907 and at https://github.com/musescore/MuseScore/pull/2182/files#diff-ff48206423d5b1e9b234471f81b89a53R970 are correct?

If so, the execution of either section could be spared if either anchor is not NONE

@MarcSabatella
Copy link
Contributor

I don't really know this section of code well at all - most of what I did with ties or slurs was elsewhere. However, I do see that "stemPos" is set in this section of code and then used further down, so it isn't just about xo and yo, which are indeed only used in the NONE case.

@mgavioli
Copy link
Contributor Author

@MarcSabatella : stemPos is used only locally for some tests to set xo and yo; neither sp or any of the elements derived from it (sc, ec, scr, ecr, note1, note2) are modified in these parts of the code, except for adding (xo, yo) at the end. So, I cannot see any effect of these code parts, if the anchors are not set to NONE.

@lasconic
Copy link
Contributor

@mgavioli it seems you are right. I guess the code grew organically.
StemPos is reused though for the second party of the code, so if we put the code in the case, we would need to declare it further up. I merge your PR and simplify the code in the next commit.

Edit: Actually we need the first part (p1) to be executed to get the value of stemPos, in case we need to execute the second part. So we could optimize the code a bit by doing the first part only if sa1 or sa2 are NONE and the second part only if sa2 is NONE, but I'm afraid we can't put the code in the case. Does it make sense?

lasconic added a commit that referenced this pull request Aug 26, 2015
Fix #70906 - TAB: slurs between stems not centred
@lasconic lasconic merged commit 7912332 into musescore:master Aug 26, 2015
lasconic added a commit that referenced this pull request Aug 26, 2015
lasconic added a commit that referenced this pull request Aug 27, 2015
@mgavioli mgavioli deleted the Fix_#70906_TAB_slur_centring branch August 27, 2015 23:15
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2024
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.

None yet

3 participants