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 beam stem direction flip (MU3) #9851

Closed
wants to merge 1 commit into from

Conversation

LovCAPONE
Copy link
Contributor

Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

Resolves: (direct link to the issue)

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.
@LovCAPONE
Copy link
Contributor Author

This PR is ready for review.

@Jojo-Schmitz The issue was that in the Beam::setBeamDirection method, there are 2 "if" blocks and the second block has to be nested. If it's not than there is a stack overflow crash.

@Nick-Mazuk
Copy link
Contributor

FYI, I'm in the middle of refactoring most of the beams code, and this PR conflicts with most of those changes.

#9792

@LovCAPONE
Copy link
Contributor Author

FYI, I'm in the middle of refactoring most of the beams code, and this PR conflicts with most of those changes.

#9792

Ok thanks for the notification, I'll fix the PR.

@Jojo-Schmitz
Copy link
Contributor

Thanks, integrated into PR #9000

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 24, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 24, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
@LovCAPONE
Copy link
Contributor Author

Thanks, integrated into PR #9000

You're welcome!

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 26, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 28, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 28, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Nov 30, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Dec 7, 2021
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
@RomanPudashkin
Copy link
Contributor

3.x is closed for any changes

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Update chord's set stem direction method to set the beam's direction
to Direction::AUTO if applicable.

Update the beam's set direction method to update its notes' stem
direction.

When a beam's direction is set with the "x" keyboard key, the
"_direction" member of the beam class is no longer equal to
"Direction::AUTO". So, in the beam's layout code the final beam
direction is not taken from the first note in the note group
(of the beam) but from the "_direction" member.

The problem is that if the user tries to set the beam's direction
with a note stem direction (in the property panel), it will be
ignored in the beam's layout code.

Backport of musescore#9800, resp. duplicate of musescore#9851
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.

4 participants