From e0520316922cb14314035f3ba6a596eb95ee9eec Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Jun 2010 22:57:48 +0000 Subject: [PATCH] Don't return true from DoTryChain() if the event wasn't really processed. Correct the return value when an event handler didn't honour "process only in this handler" flag: we shouldn't pass the event to the further handlers in this case but we shouldn't return true neither as the event wasn't really processed. This corrects background painting of wxHtmlWindow broken by previous changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/event.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index c4f1ae8164..1cc349614d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1447,8 +1447,11 @@ bool wxEvtHandler::DoTryChain(wxEvent& event) // for it by not processing the event further because this was already // done by that rogue event handler. wxEventProcessInHandlerOnly processInHandlerOnly(event, h); - if ( h->ProcessEvent(event) || !event.ShouldProcessOnlyIn(h) ) + if ( h->ProcessEvent(event) ) return true; + + if ( !event.ShouldProcessOnlyIn(h) ) + break; } return false; -- 2.45.2