Skip to content

Commit 42dd45f

Browse files
Merge pull request #28397 from mafaldarpdias/special-character-formatting-copy-paste-bug
Fix #26402: Formatting lost when special character is copied and pasted
2 parents 3a1d66f + 02e48bf commit 42dd45f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engraving/dom/textedit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void TextBase::insertSym(EditData& ed, SymId id)
271271
deleteSelectedText(ed);
272272
String s = score()->engravingFont()->toString(id);
273273
cursor->format()->setFontFamily(u"ScoreText");
274-
score()->undo(new InsertText(m_cursor, s), &ed);
274+
score()->undo(new InsertText(cursor, s), &ed);
275275
}
276276

277277
//---------------------------------------------------------
@@ -958,6 +958,7 @@ void TextBase::paste(EditData& ed, const String& txt)
958958
sym.clear();
959959
} else if (token == "/sym") {
960960
symState = false;
961+
static_cast<TextEditData*>(ed.getData(this).get())->cursor()->setFormat(format);
961962
insertSym(ed, SymNames::symIdByName(sym));
962963
} else {
963964
prepareFormat(token, format);

0 commit comments

Comments
 (0)