X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/501358073ba90c87257dd2c3a48a429f9c004f19..538f4dd82b7d37293a45516da0036b453f631f9f:/src/common/textcmn.cpp diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index fa4d41ffbc..473de1178f 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -188,9 +188,11 @@ bool wxTextAttr::operator== (const wxTextAttr& attr) const GetURL() == attr.GetURL(); } -// Partial equality test taking flags into account -bool wxTextAttr::EqPartial(const wxTextAttr& attr, int flags) const +// Partial equality test. Only returns false if an attribute doesn't match. +bool wxTextAttr::EqPartial(const wxTextAttr& attr) const { + int flags = attr.GetFlags(); + if ((flags & wxTEXT_ATTR_TEXT_COLOUR) && GetTextColour() != attr.GetTextColour()) return false;