Small cleanup.
Set caret position when calling SetSelection. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2249,6 +2249,7 @@ void wxRichTextCtrl::DoSetSelection(long from, long to, bool WXUNUSED(scrollCare
|
||||
{
|
||||
m_selectionAnchor = from;
|
||||
m_selectionRange.SetRange(from, to-1);
|
||||
m_caretPosition = from-1;
|
||||
|
||||
Refresh(false);
|
||||
PositionCaret();
|
||||
@@ -3098,6 +3099,12 @@ bool wxRichTextCtrl::PromoteList(int promoteBy, const wxRichTextRange& range, co
|
||||
return GetBuffer().PromoteList(promoteBy, range.ToInternal(), defName, flags, specifiedLevel);
|
||||
}
|
||||
|
||||
/// Deletes the content in the given range
|
||||
bool wxRichTextCtrl::Delete(const wxRichTextRange& range)
|
||||
{
|
||||
return GetBuffer().DeleteRangeWithUndo(range.ToInternal(), this);
|
||||
}
|
||||
|
||||
const wxArrayString& wxRichTextCtrl::GetAvailableFontNames()
|
||||
{
|
||||
if (sm_availableFontNames.GetCount() == 0)
|
||||
|
Reference in New Issue
Block a user