From f52eff546ab16990767e06e25c00b3d8fd2729f9 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sun, 19 Nov 2006 07:45:54 +0000 Subject: [PATCH] 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 --- src/richtext/richtextctrl.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index a3d7c064db..9fc9317ce0 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -587,10 +587,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) // so subtract 1 for deleted character and add 1 for conversion to character position. if (m_caretPosition > -1 && !HasSelection()) { - GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition), - m_caretPosition, // Current caret position - m_caretPosition-1, // New caret position - this); + GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition, m_caretPosition), this); } else DeleteSelectedContent(); @@ -625,10 +622,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) // Submit range in character positions, which are greater than caret positions, if (m_caretPosition < GetBuffer().GetRange().GetEnd()+1 && !HasSelection()) { - GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1), - m_caretPosition, // Current caret position - m_caretPosition+1, // New caret position - this); + GetBuffer().DeleteRangeWithUndo(wxRichTextRange(m_caretPosition+1, m_caretPosition+1), this); } else DeleteSelectedContent(); @@ -826,10 +820,7 @@ bool wxRichTextCtrl::DeleteSelectedContent(long* newPos) if (HasSelection()) { long pos = m_selectionRange.GetStart(); - GetBuffer().DeleteRangeWithUndo(m_selectionRange, - m_caretPosition, // Current caret position - pos, // New caret position - this); + GetBuffer().DeleteRangeWithUndo(m_selectionRange, this); m_selectionRange.SetRange(-2, -2); if (newPos) @@ -2275,10 +2266,7 @@ void wxRichTextCtrl::Remove(long from, long to) { SelectNone(); - GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to), - m_caretPosition, // Current caret position - from, // New caret position - this); + GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to), this); LayoutContent(); if (!IsFrozen()) -- 2.45.2