Fixed two out by one errors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-02-20 20:32:13 +00:00
parent f89e3c6f87
commit 109b4aa352
2 changed files with 2 additions and 2 deletions

View File

@@ -1764,7 +1764,7 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const
splitPoint ++; splitPoint ++;
// Find last object // Find last object
if (splitPoint == newPara->GetRange().GetEnd() || splitPoint == (newPara->GetRange().GetEnd() - 1)) if (splitPoint == newPara->GetRange().GetEnd())
lastObject = newPara->GetChildren().GetLast()->GetData(); lastObject = newPara->GetChildren().GetLast()->GetData();
else else
// lastObject is set as a side-effect of splitting. It's // lastObject is set as a side-effect of splitting. It's

View File

@@ -2325,7 +2325,7 @@ void wxRichTextCtrl::Remove(long from, long to)
{ {
SelectNone(); SelectNone();
GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to), this); GetBuffer().DeleteRangeWithUndo(wxRichTextRange(from, to-1), this);
LayoutContent(); LayoutContent();
if (!IsFrozen()) if (!IsFrozen())