]> git.saurik.com Git - wxWidgets.git/commitdiff
Use ProcessEventLocally() instead of ProcessEventHere() in docview code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 May 2010 14:55:41 +0000 (14:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 9 May 2010 14:55:41 +0000 (14:55 +0000)
Use wxEvtHandler::ProcessEventLocally() instead of ProcessEventHere() when
forwarding events in the docview code. This ensures that any event handlers
chained with the objects involved (document manager, document, view) will be
used.

Incidentally the old code didn't work at all as ProcessEventHere() didn't even
call TryBefore() where the (further) forwarding was implemented.

Closes #10640.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/docview.h
src/common/docmdi.cpp
src/common/docview.cpp

index 6f678c9b290cb12654d9caa9a7ee485df47b64f7..f8b7ea2cb72b31dd75b7e5118cbfc8c1421e1013 100644 (file)
@@ -580,7 +580,7 @@ protected:
     // a chance to process the message before the frame event handlers are used
     bool TryProcessEvent(wxEvent& event)
     {
-        return m_childView && m_childView->ProcessEventHere(event);
+        return m_childView && m_childView->ProcessEventLocally(event);
     }
 
     // called from EVT_CLOSE handler in the frame: check if we can close and do
index c8911d606ade00fac77d21b670060ab02946e503..0767a621044d97ce42bb0dde1b8006db84c69f08 100644 (file)
@@ -70,7 +70,7 @@ void wxDocMDIParentFrame::OnMRUFile(wxCommandEvent& event)
 
 bool wxDocMDIParentFrame::TryBefore(wxEvent& event)
 {
-    if ( m_docManager && m_docManager->ProcessEventHere(event) )
+    if ( m_docManager && m_docManager->ProcessEventLocally(event) )
         return true;
 
     return wxMDIParentFrame::TryBefore(event);
index 64315afb6086bbeae868c9b5741ebd4f453e8eb0..335265e02c972d9fddc9d4a94ce9bd09bf594f0b 100644 (file)
@@ -689,7 +689,7 @@ void wxView::SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame)
 bool wxView::TryBefore(wxEvent& event)
 {
     wxDocument * const doc = GetDocument();
-    return doc && doc->ProcessEventHere(event);
+    return doc && doc->ProcessEventLocally(event);
 }
 
 void wxView::OnActivateView(bool WXUNUSED(activate),
@@ -1252,7 +1252,7 @@ wxView *wxDocManager::GetActiveView() const
 bool wxDocManager::TryBefore(wxEvent& event)
 {
     wxView * const view = GetActiveView();
-    return view && view->ProcessEventHere(event);
+    return view && view->ProcessEventLocally(event);
 }
 
 namespace
@@ -1970,7 +1970,7 @@ void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
 // Extend event processing to search the view's event table
 bool wxDocParentFrame::TryBefore(wxEvent& event)
 {
-    if ( m_docManager && m_docManager->ProcessEventHere(event) )
+    if ( m_docManager && m_docManager->ProcessEventLocally(event) )
         return true;
 
     return wxFrame::TryBefore(event);