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 #15726 (Glissando & Bends): Some elements are lost when changing time signature #26028

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pacebes
Copy link
Contributor

@pacebes pacebes commented Jan 8, 2025

Resolves: #15726 (Glissando and Bends)

This PR keeps Glissando & Bends when changing time signature:

  • TrackList read and write methods now clone Note's Spanners and rebuild Spanners End and Start elements
  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@pacebes pacebes force-pushed the 15726-someElementsLostWhenChangingTimeSiganture_GlissandoBends branch from 82aa1be to ce9d0aa Compare January 8, 2025 23:13
@pacebes pacebes force-pushed the 15726-someElementsLostWhenChangingTimeSiganture_GlissandoBends branch from ce9d0aa to 90b54b8 Compare January 9, 2025 08:34
@pacebes pacebes force-pushed the 15726-someElementsLostWhenChangingTimeSiganture_GlissandoBends branch from 90b54b8 to aa99482 Compare January 9, 2025 13:00
@pacebes pacebes force-pushed the 15726-someElementsLostWhenChangingTimeSiganture_GlissandoBends branch from aa99482 to 053fc78 Compare January 9, 2025 13:04
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 9, 2025
@pacebes
Copy link
Contributor Author

pacebes commented Jan 9, 2025

I have changed the way we clone Note's Spanners (outside Note copy constructor) to avoid failing tests.

There is a duplicated function (TrackList::cloneAndRebuildSpanners) and lamba function cloneAndRebuildSpannersWrite within write method) because write method is const ( bool write(Score*, const Fraction&) const; ). If we can change this method to "not const" (bool TrackList::write(Score* score, const Fraction& tick) ) we could avoid this duplication. I have not come up with any other way, any hint to avoid function duplication would be appreciated

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 9, 2025
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.

Some elements are lost when changing time signature
2 participants