Fixed wxRichTextCtrl caret test case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2208,7 +2208,7 @@ bool wxRichTextCtrl::MoveToParagraphStart(int flags)
|
|||||||
if (!extendSel)
|
if (!extendSel)
|
||||||
SelectNone();
|
SelectNone();
|
||||||
|
|
||||||
SetCaretPosition(newPos);
|
SetCaretPosition(newPos, true);
|
||||||
PositionCaret();
|
PositionCaret();
|
||||||
SetDefaultStyleToCursorStyle();
|
SetDefaultStyleToCursorStyle();
|
||||||
|
|
||||||
@@ -3174,6 +3174,7 @@ void wxRichTextCtrl::SetInsertionPoint(long pos)
|
|||||||
SelectNone();
|
SelectNone();
|
||||||
|
|
||||||
m_caretPosition = pos - 1;
|
m_caretPosition = pos - 1;
|
||||||
|
m_caretAtLineStart = true;
|
||||||
|
|
||||||
PositionCaret();
|
PositionCaret();
|
||||||
|
|
||||||
|
@@ -350,7 +350,7 @@ void RichTextCtrlTestCase::CaretPosition()
|
|||||||
m_rich->AddParagraph("This is paragraph one");
|
m_rich->AddParagraph("This is paragraph one");
|
||||||
m_rich->AddParagraph("Paragraph two\n has \nlots of\n lines");
|
m_rich->AddParagraph("Paragraph two\n has \nlots of\n lines");
|
||||||
|
|
||||||
m_rich->MoveCaret(1);
|
m_rich->SetInsertionPoint(2);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(1, m_rich->GetCaretPosition());
|
CPPUNIT_ASSERT_EQUAL(1, m_rich->GetCaretPosition());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user