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/branches/WX_2_8_BRANCH@63345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-02-01 12:07:28 +00:00
parent 89d0b1ab06
commit e4db8a879f
3 changed files with 8 additions and 13 deletions

View File

@@ -3012,7 +3012,7 @@ bool wxRichTextParagraphLayoutBox::HasCharacterAttributes(const wxRichTextRange&
node = node->GetNext();
}
return foundCount == matchingCount;
return foundCount == matchingCount && foundCount != 0;
}
bool wxRichTextParagraphLayoutBox::HasCharacterAttributes(const wxRichTextRange& range, const wxTextAttrEx& style) const
@@ -3056,7 +3056,7 @@ bool wxRichTextParagraphLayoutBox::HasParagraphAttributes(const wxRichTextRange&
node = node->GetNext();
}
return foundCount == matchingCount;
return foundCount == matchingCount && foundCount != 0;
}
bool wxRichTextParagraphLayoutBox::HasParagraphAttributes(const wxRichTextRange& range, const wxTextAttrEx& style) const