Skip to content

Commit

Permalink
Fix #313145: Add synalepha shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Asmatzaile committed Nov 25, 2020
1 parent 079b871 commit 7e497a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libmscore/textedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ bool TextBase::edit(EditData& ed)
QString s = ed.s;
bool ctrlPressed = ed.modifiers & Qt::ControlModifier;
bool shiftPressed = ed.modifiers & Qt::ShiftModifier;
bool altPressed = ed.modifiers & Qt::AltModifier;

QTextCursor::MoveMode mm = shiftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor;

Expand Down Expand Up @@ -455,6 +456,13 @@ bool TextBase::edit(EditData& ed)
}
}
}
if (ctrlPressed && altPressed) {
switch (ed.key) {
case Qt::Key_hyphen:
s = "\u203f"; // Unicode undertie
break;
}
}
if (!s.isEmpty()) {
deleteSelectedText(ed);
score()->undo(new InsertText(_cursor, s), &ed);
Expand Down

0 comments on commit 7e497a9

Please sign in to comment.