Improved auto list numbering

Fixed selection bugs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-08-22 15:21:50 +00:00
parent 44bcee116e
commit e2d0875aa7
3 changed files with 94 additions and 14 deletions

View File

@@ -1097,6 +1097,9 @@ bool wxRichTextCtrl::ExtendSelection(long oldPos, long newPos, int flags)
{
if (flags & wxRICHTEXT_SHIFT_DOWN)
{
if (oldPos == newPos)
return false;
wxRichTextRange oldSelection = m_selectionRange;
// If not currently selecting, start selecting
@@ -1115,6 +1118,8 @@ bool wxRichTextCtrl::ExtendSelection(long oldPos, long newPos, int flags)
// the end.
if (newPos > m_selectionAnchor)
m_selectionRange.SetRange(m_selectionAnchor+1, newPos);
else if (newPos == m_selectionAnchor)
m_selectionRange = wxRichTextRange(-2, -2);
else
m_selectionRange.SetRange(newPos+1, m_selectionAnchor);
}