From c6c68635d347ffec796c1a896f39440783317850 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 6 Nov 2013 12:44:21 +0000 Subject: [PATCH] Don't merge text objects if they have different identifiers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) 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.