Skip to content

Conversation

@mathesoncalum
Copy link
Contributor

Resolves: #17550

In this PR, straight quotes are automatically replaced with curly quotes. The replacement is performed as a separate undo action, so pressing Ctrl+Z restores the original straight quote.

Code-wise:

  • Added a new private NotationInteraction::doEditText method which will detect straight quotes and perform the undoable replacement.
  • Simplified NotationInteraction::editElement(QKeyEvent*) by moving key handling into handleKeyPress.
  • Undoing while editing text no longer exits text edit mode.

Copy link
Member

@cbjeukendrup cbjeukendrup left a comment

Choose a reason for hiding this comment

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

I believe this is fine, undo-stack-wise, and on a quick test I didn't see any suspicious behaviour or warnings.

@Jojo-Schmitz
Copy link
Contributor

This does not consider non-English quote styles (see the issue for examples), does it?

@zacjansheski
Copy link
Contributor

If I make a curly bracket straight, then highlight+delete, then undo, the " is a &

Untitled.mp4

@zacjansheski
Copy link
Contributor

Actually that bug is in master as well, so it is unrelated

@mathesoncalum mathesoncalum merged commit d90b8f9 into musescore:master Dec 18, 2025
12 checks passed
@mathesoncalum mathesoncalum deleted the 17550-auto_curly_quotes branch December 18, 2025 18:09
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.

Add “Curly quotes” option or plugin

5 participants