diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 5ec84b74f2..205fc539f1 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -7184,6 +7184,9 @@ bool wxRichTextPlainText::CanMerge(wxRichTextObject* object, wxRichTextDrawingCo if (!wxTextAttrEq(GetAttributes(), object->GetAttributes()) || !(m_properties == object->GetProperties())) return false; + if (!otherObj->GetId().IsEmpty() && GetId() != otherObj->GetId()) + return false; + // Check if differing virtual attributes makes it impossible to merge // these strings.