Skip to content

Fix some text type's offsets when migrating scores to 4.7#33590

Open
miiizen wants to merge 1 commit into
musescore:4.7from
miiizen:33584-text-migration-47
Open

Fix some text type's offsets when migrating scores to 4.7#33590
miiizen wants to merge 1 commit into
musescore:4.7from
miiizen:33584-text-migration-47

Conversation

@miiizen
Copy link
Copy Markdown
Contributor

@miiizen miiizen commented May 27, 2026

Resolves: #33584

This PR adds the compatibility missed in #31187.
For lyrics, fingering, HOPO text, measure numbers, staff text and tapping, when "Scale with stave size" was ticked offset was expressed in mm not spatium. In 4.7 for these types, offsets are always in spatium.

// Text offset could have been in mm for these types prior to 4.7
// Convert actual distance to spatium
if ((item->isFingering() || item->isHammerOnPullOffText() || item->isLyrics() || !item->isMeasureNumber()
|| item->isStaffText() || item->isTapping()) && !item->sizeIsSpatiumDependent()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Better to define an unordered_map with these types and use muse::contains to avoid the chain of ||.

@miiizen miiizen linked an issue May 27, 2026 that may be closed by this pull request
4 tasks
@miiizen miiizen force-pushed the 33584-text-migration-47 branch from 45857ac to 6df459c Compare May 27, 2026 13:07
@miiizen miiizen force-pushed the 33584-text-migration-47 branch from 6df459c to e8b7391 Compare June 2, 2026 20:19
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.

Lyrics clash into the staves

3 participants