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

Remove unnecessary track mapping code #23968

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Aug 9, 2024

Resolves: #23965

The fix was quite simple. The more worrying thing was that such a basic requirement hadn't been covered by any unit tests, so I've created a new one.

This code was conflicting with the newly reimplemented function Staff::getLinkedTrackInStaff. The logic that these pieces of code were trying to handle is now all handled (as it should) in one single place.
@mike-spa mike-spa force-pushed the removeUnnecessaryTrackMappingCode branch from 3eff0b8 to 992fd55 Compare August 9, 2024 17:42
@@ -6431,15 +6420,6 @@ void Score::undoAddCR(ChordRest* cr, Measure* measure, const Fraction& tick)

Staff* ostaff = cr->staff();
track_idx_t strack = ostaff->idx() * VOICES + cr->voice();
Copy link
Contributor

@miiizen miiizen Aug 12, 2024

Choose a reason for hiding this comment

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

Would cr->track() work here? Just for clarity & consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely, thanks

@miiizen miiizen merged commit 47b0f1a into musescore:master Aug 12, 2024
11 checks passed
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.

Score corrupted when entering notes in parts
3 participants