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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user