Fixed bug [ 1870906 ] There are few problems selection text by mouse in RichTextCt

Fixed bug [ 1870265 ] window does not scroll after pasting text
Fixed bug [ 1870264 ] wxTextUrlEvent after click in empty space
Fixed bug [ 1806479 ] wxRichText URL issues (URL event triggered when clicking on blank space)
Fixed bug [ 1806953 ] wxRichTextControl::AddParagraph() is broken
Fixed a bug in SelectWord causing bad selections.
Added Ctrl+Backspace word deletion.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-02-26 12:54:01 +00:00
parent a2968d85eb
commit 62381daaaf
2 changed files with 34 additions and 6 deletions

View File

@@ -309,7 +309,8 @@ int wxRichTextCompositeObject::HitTest(wxDC& dc, const wxPoint& pt, long& textPo
node = node->GetNext();
}
return wxRICHTEXT_HITTEST_NONE;
textPosition = GetRange().GetEnd()-1;
return wxRICHTEXT_HITTEST_AFTER|wxRICHTEXT_HITTEST_OUTSIDE;
}
/// Finds the absolute position and row height for the given character position
@@ -3754,7 +3755,7 @@ int wxRichTextParagraph::HitTest(wxDC& dc, const wxPoint& pt, long& textPosition
wxSize lineSize = line->GetSize();
wxRichTextRange lineRange = line->GetAbsoluteRange();
if (pt.y >= linePos.y && pt.y <= linePos.y + lineSize.y)
if (pt.y <= linePos.y + lineSize.y)
{
if (pt.x < linePos.x)
{
@@ -5725,6 +5726,8 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
if (richTextBuffer)
{
InsertParagraphsWithUndo(position+1, *richTextBuffer, GetRichTextCtrl(), wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE);
if (GetRichTextCtrl())
GetRichTextCtrl()->ShowPosition(position + richTextBuffer->GetRange().GetEnd());
delete richTextBuffer;
}
}
@@ -5748,6 +5751,9 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
#endif
InsertTextWithUndo(position+1, text2, GetRichTextCtrl());
if (GetRichTextCtrl())
GetRichTextCtrl()->ShowPosition(position + text2.Length());
success = true;
}
else if (wxTheClipboard->IsSupported(wxDF_BITMAP))