Fix API calls to match header changes made in richtextbuffer.h 1.42 and restore compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -587,10 +587,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
// so subtract 1 for deleted character and add 1 for conversion to character position.
|
||||||
if (m_caretPosition > -1 && !HasSelection())
|
if (m_caretPosition > -1 && !HasSelection())
|
||||||
{
|
{
|
||||||
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition),
|
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition), this);
|
||||||
m_caretPosition, // Current caret position
|
|
||||||
m_caretPosition-1, // New caret position
|
|
||||||
this);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DeleteSelectedContent();
|
DeleteSelectedContent();
|
||||||
@@ -625,10 +622,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
// Submit range in character positions, which are greater than caret positions,
|
// Submit range in character positions, which are greater than caret positions,
|
||||||
if (m_caretPosition < GetBuffer().GetRange().GetEnd()+1 && !HasSelection())
|
if (m_caretPosition < GetBuffer().GetRange().GetEnd()+1 && !HasSelection())
|
||||||
{
|
{
|
||||||
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1),
|
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1), this);
|
||||||
m_caretPosition, // Current caret position
|
|
||||||
m_caretPosition+1, // New caret position
|
|
||||||
this);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DeleteSelectedContent();
|
DeleteSelectedContent();
|
||||||
@@ -826,10 +820,7 @@ bool wxRichTextCtrl::DeleteSelectedContent(long* newPos)
|
|||||||
if (HasSelection())
|
if (HasSelection())
|
||||||
{
|
{
|
||||||
long pos = m_selectionRange.GetStart();
|
long pos = m_selectionRange.GetStart();
|
||||||
GetBuffer().DeleteRangeWithUndo(m_selectionRange,
|
GetBuffer().DeleteRangeWithUndo(m_selectionRange, this);
|
||||||
m_caretPosition, // Current caret position
|
|
||||||
pos, // New caret position
|
|
||||||
this);
|
|
||||||
m_selectionRange.SetRange(-2, -2);
|
m_selectionRange.SetRange(-2, -2);
|
||||||
|
|
||||||
if (newPos)
|
if (newPos)
|
||||||
@@ -2275,10 +2266,7 @@ void wxRichTextCtrl::Remove(long from, long to)
|
|||||||
{
|
{
|
||||||
SelectNone();
|
SelectNone();
|
||||||
|
|
||||||
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to),
|
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to), this);
|
||||||
m_caretPosition, // Current caret position
|
|
||||||
from, // New caret position
|
|
||||||
this);
|
|
||||||
|
|
||||||
LayoutContent();
|
LayoutContent();
|
||||||
if (!IsFrozen())
|
if (!IsFrozen())
|
||||||
|
Reference in New Issue
Block a user