Switched off some buggy optimisation that caused caret positioning/drawn text mismatch.
Fixed defragmentation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,6 +57,7 @@ const wxChar wxRichTextLineBreakChar = (wxChar) 29;
|
||||
|
||||
inline void wxCheckSetFont(wxDC& dc, const wxFont& font)
|
||||
{
|
||||
#if 0
|
||||
const wxFont& font1 = dc.GetFont();
|
||||
if (font1.IsOk() && font.IsOk())
|
||||
{
|
||||
@@ -68,6 +69,7 @@ inline void wxCheckSetFont(wxDC& dc, const wxFont& font)
|
||||
font1.GetFaceName() == font.GetFaceName())
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
dc.SetFont(font);
|
||||
}
|
||||
|
||||
@@ -431,7 +433,7 @@ bool wxRichTextCompositeObject::Defragment(const wxRichTextRange& range)
|
||||
while (node)
|
||||
{
|
||||
wxRichTextObject* child = node->GetData();
|
||||
if (!child->GetRange().IsOutside(range))
|
||||
if (range == wxRICHTEXT_ALL || !child->GetRange().IsOutside(range))
|
||||
{
|
||||
wxRichTextCompositeObject* composite = wxDynamicCast(child, wxRichTextCompositeObject);
|
||||
if (composite)
|
||||
|
Reference in New Issue
Block a user