Fixed caret sizing bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2713,12 +2713,13 @@ void wxRichTextCtrl::PositionCaret()
|
||||
wxRect caretRect;
|
||||
if (GetCaretPositionForIndex(GetCaretPosition(), caretRect))
|
||||
{
|
||||
wxPoint originalPt = caretRect.GetPosition();
|
||||
wxPoint pt = GetPhysicalPoint(originalPt);
|
||||
if (GetCaret()->GetPosition() != pt)
|
||||
wxPoint newPt = caretRect.GetPosition();
|
||||
wxSize newSz = caretRect.GetSize();
|
||||
wxPoint pt = GetPhysicalPoint(newPt);
|
||||
if (GetCaret()->GetPosition() != pt || GetCaret()->GetSize() != newSz)
|
||||
{
|
||||
GetCaret()->Move(pt);
|
||||
GetCaret()->SetSize(caretRect.GetSize());
|
||||
GetCaret()->SetSize(newSz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user