Skip to content

Conversation

@mafaldarpdias
Copy link
Contributor

@mafaldarpdias mafaldarpdias commented Jun 13, 2025

Resolves: #26402

Copying and pasting a musical symbol with a modified size in a system text object caused the size to reset. This happened because the cursor used during insertion was from the paste location rather than the copied element. Additionally, the format was not properly stored in the edit text object (ed), so when TextBase::insertSym() was called, it lacked the correct formatting.
I fixed this by ensuring the correct cursor was used for insertion and explicitly setting the format in the edit text object before passing it to TextBase::insertSym() during TextBase::paste(), preserving the symbol’s modified size.

  • 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)

… and pasted

Copying and pasting a musical symbol with a modified size in a system
text object caused the size to reset. This happened because the cursor
used during insertion was from the paste location rather than the copied
element. Additionally, the format was not properly stored in the edit
text object (ed), so when TextBase::insertSym() was called, it
lacked the correct formatting.
I fixed this by ensuring the correct cursor was used for insertion
and explicitly setting the format in the edit text object before
passing it to TextBase::insertSym() during TextBase::paste(),
preserving the symbol’s modified size.
Copy link
Contributor

@mathesoncalum mathesoncalum left a comment

Choose a reason for hiding this comment

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

Cool, this all looks sensible to me - thanks very much!

@mathesoncalum mathesoncalum assigned ghost Jun 20, 2025
@mathesoncalum mathesoncalum merged commit 42dd45f into musescore:master Jun 20, 2025
13 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.

Formatting lost when special character copied and pasted from one text object to another

2 participants