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;
|
wxRect caretRect;
|
||||||
if (GetCaretPositionForIndex(GetCaretPosition(), caretRect))
|
if (GetCaretPositionForIndex(GetCaretPosition(), caretRect))
|
||||||
{
|
{
|
||||||
wxPoint originalPt = caretRect.GetPosition();
|
wxPoint newPt = caretRect.GetPosition();
|
||||||
wxPoint pt = GetPhysicalPoint(originalPt);
|
wxSize newSz = caretRect.GetSize();
|
||||||
if (GetCaret()->GetPosition() != pt)
|
wxPoint pt = GetPhysicalPoint(newPt);
|
||||||
|
if (GetCaret()->GetPosition() != pt || GetCaret()->GetSize() != newSz)
|
||||||
{
|
{
|
||||||
GetCaret()->Move(pt);
|
GetCaret()->Move(pt);
|
||||||
GetCaret()->SetSize(caretRect.GetSize());
|
GetCaret()->SetSize(newSz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user