]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't return true from DoTryChain() if the event wasn't really processed.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:57:48 +0000 (22:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jun 2010 22:57:48 +0000 (22:57 +0000)
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

index c4f1ae81640e7652a7074d78398f7737f92f1320..1cc349614dbc51bc3b2ce94a687eed17377ccd32 100644 (file)
@@ -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);
         // 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;
             return true;
+
+        if ( !event.ShouldProcessOnlyIn(h) )
+            break;
     }
 
     return false;
     }
 
     return false;