]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbuffer.cpp
Simplify SetSelectionRange and make consistent with SetSelection.
[wxWidgets.git] / src / richtext / richtextbuffer.cpp
index fc722e8b62a275cf54f305df85bfd1cd227c4bca..bf1efe3ca3ba09712883bf39edf1c300c7e171eb 100644 (file)
@@ -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()