Simplify SetSelectionRange and make consistent with SetSelection.
Fix a bug that returns true for character and paragraph style tests if no characters or paragraphs were found. Fix SetSelection to position caret at end. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2495,7 +2495,7 @@ bool wxRichTextParagraphLayoutBox::HasCharacterAttributes(const wxRichTextRange&
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
return foundCount == matchingCount;
|
||||
return foundCount == matchingCount && foundCount != 0;
|
||||
}
|
||||
|
||||
/// Test if this whole range has paragraph attributes of the specified kind. If any
|
||||
@@ -2533,7 +2533,7 @@ bool wxRichTextParagraphLayoutBox::HasParagraphAttributes(const wxRichTextRange&
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
return foundCount == matchingCount;
|
||||
return foundCount == matchingCount && foundCount != 0;
|
||||
}
|
||||
|
||||
void wxRichTextParagraphLayoutBox::Clear()
|
||||
|
Reference in New Issue
Block a user