Corrected wxRichTextCaret refresh
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3757,7 +3757,9 @@ void wxRichTextCtrl::PositionCaret(wxRichTextParagraphLayoutBox* container)
|
|||||||
wxRect caretRect;
|
wxRect caretRect;
|
||||||
if (GetCaretPositionForIndex(GetCaretPosition(), caretRect, container))
|
if (GetCaretPositionForIndex(GetCaretPosition(), caretRect, container))
|
||||||
{
|
{
|
||||||
|
#if !wxRICHTEXT_USE_OWN_CARET
|
||||||
caretRect = GetScaledRect(caretRect);
|
caretRect = GetScaledRect(caretRect);
|
||||||
|
#endif
|
||||||
int topMargin = (int) (0.5 + GetScale()*GetBuffer().GetTopMargin());
|
int topMargin = (int) (0.5 + GetScale()*GetBuffer().GetTopMargin());
|
||||||
int bottomMargin = (int) (0.5 + GetScale()*GetBuffer().GetBottomMargin());
|
int bottomMargin = (int) (0.5 + GetScale()*GetBuffer().GetBottomMargin());
|
||||||
wxPoint newPt = caretRect.GetPosition();
|
wxPoint newPt = caretRect.GetPosition();
|
||||||
@@ -4799,8 +4801,9 @@ void wxRichTextCaret::DoMove()
|
|||||||
{
|
{
|
||||||
if (m_richTextCtrl && m_refreshEnabled)
|
if (m_richTextCtrl && m_refreshEnabled)
|
||||||
{
|
{
|
||||||
wxRect rect(GetPosition(), GetSize());
|
wxRect rect(wxPoint(m_xOld, m_yOld), GetSize());
|
||||||
m_richTextCtrl->RefreshRect(rect, false);
|
wxRect scaledRect = m_richTextCtrl->GetScaledRect(rect);
|
||||||
|
m_richTextCtrl->RefreshRect(scaledRect, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4851,7 +4854,8 @@ void wxRichTextCaret::Refresh()
|
|||||||
if (m_richTextCtrl && m_refreshEnabled)
|
if (m_richTextCtrl && m_refreshEnabled)
|
||||||
{
|
{
|
||||||
wxRect rect(GetPosition(), GetSize());
|
wxRect rect(GetPosition(), GetSize());
|
||||||
m_richTextCtrl->RefreshRect(rect, false);
|
wxRect rectScaled = m_richTextCtrl->GetScaledRect(rect);
|
||||||
|
m_richTextCtrl->RefreshRect(rectScaled, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user