X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa926768a9329b4eb4804c89de8da2061549708d..538f4dd82b7d37293a45516da0036b453f631f9f:/src/common/textcmn.cpp diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index 06824dd481..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; @@ -1006,25 +1008,6 @@ wxTextAreaBase::HitTest(const wxPoint& WXUNUSED(pt), long * WXUNUSED(pos)) const return wxTE_HT_UNKNOWN; } -// ---------------------------------------------------------------------------- -// events -// ---------------------------------------------------------------------------- - -/* static */ -bool wxTextCtrlBase::SendTextUpdatedEvent(wxWindow *win) -{ - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, win->GetId()); - - // do not do this as it could be very inefficient if the text control - // contains a lot of text and we're not using ref-counted wxString - // implementation -- instead, event.GetString() will query the control for - // its current text if needed - //event.SetString(win->GetValue()); - - event.SetEventObject(win); - return win->GetEventHandler()->ProcessEvent(event); -} - #else // !wxUSE_TEXTCTRL // define this one even if !wxUSE_TEXTCTRL because it is also used by other