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 #166016 slur on grace after wrong #3380

Closed
wants to merge 2 commits into from
Closed

fix #166016 slur on grace after wrong #3380

wants to merge 2 commits into from

Conversation

lyrischesich
Copy link
Contributor

The algorithm for finding the first and last note of the selection ends up with the two notes reversed. This happens only if a gracenote after is part of the selection. So I decided to test for this case and simply commute the two values.

@@ -4487,6 +4487,11 @@ void ScoreView::cmdAddSlur()
return;
if (firstNote == lastNote)
lastNote = 0;
else if (firstNote->chord()->isGraceAfter()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we understand why the notes are reversed, and are we sure it is both a) always true for grace notes after, and b) never not true for grace notes after? Personally, I'd rather see the the basic algorithm fixed rather than patched at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with your doubts and revised the algorithm. Now it should cover every possible case, including grace notes before and after.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Jan 7, 2018

Please make sure the issue numbers are mentioned in the commit title. having them only in the PR title don't result in the issues to automagically get marked as fixed once the PR got merged.
Also I think you'd better squash the commits into one

@lyrischesich
Copy link
Contributor Author

I changed the commit titles

@lasconic
Copy link
Contributor

I guess we don't really need the two commits here right ? Can they be squashed?
http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

@lyrischesich
Copy link
Contributor Author

Shure.

@lasconic
Copy link
Contributor

In general we don't accept PR on the 2.2 branch. The development happens on the master branch only and fixes that apply to 2.2 are manually cherry picked to the 2.2 branch. If you plan to do other PR, please use the master branch.

@Jojo-Schmitz
Copy link
Contributor

Unless the PR applies to 2.2 only and not to master at all, or needs to be very different between the 2

@lyrischesich
Copy link
Contributor Author

So I should close this and do another PR on master? Since the original code looks very similar in 2.2. an master.

@Jojo-Schmitz
Copy link
Contributor

I believe @lasconic would let this one here pass as is (once squashed) ;-), as far as I understood he's talking about future PRs from you

…selection ends up with the two notes reversed. This happens only if a gracenote after is part of the selection. So I decided to test for this case and simply commute the two values.
…note in a list of selected notes. It respects notes as well as gracenotes before and after them.
@Jojo-Schmitz
Copy link
Contributor

BTW: this makes me wonder whether #3381 was really meant for 2.2 only?

@lyrischesich
Copy link
Contributor Author

#3381 fixes three issues in 2.2, but in master only one of them (#267721) exists

@Jojo-Schmitz
Copy link
Contributor

Oh, OK, and for that there is no fix yet, right? I'll reopen that issue then

@lasconic
Copy link
Contributor

If find the logic in this PR hard to follow. Here is my take on the same issue: #3387 What do you think?

@lasconic lasconic closed this Jan 12, 2018
@lyrischesich lyrischesich deleted the 166016-slur-on-grace-after-wrong branch January 15, 2018 13:48
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

4 participants