Fix event handling order in doc/view framework.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 May 2013 23:59:56 +0000 (23:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 May 2013 23:59:56 +0000 (23:59 +0000)
commita7c0de8a98250e908329ece9e14742b9d688d1e4
treea69265c369a277780b00d38062cfc2f1cd24e049
parent80dcb89812d84f41567a69ff83769b26ab519468
Fix event handling order in doc/view framework.

Ensure that the events are always (provided there is an open document)
processed in the following order:

1. wxDocument
2. wxView
3. wxDocManager
4. wxDocChildFrame
5. wxDocParentFrame
6. wxApp

Do this by forwarding the events from wxDocParentFrame to wxDocChildFrame
first and forward them from there to wxDocManager which -- and this part
remains unchanged -- in turn forwards them to the active wxView which finally
forwards them to wxDocument. This requires another condition in the event
handling code as we still must forward from wxDocParentFrame to wxDocManager
itself if there are no active children at all, but this is the only way to
have the same event order in all cases, whether the event is originally
received by wxDocChildFrame or wxDocParentFrame.

Document this and add a unit test verifying that things indeed work like this.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
docs/doxygen/overviews/docview.h
include/wx/docview.h
src/common/docview.cpp
tests/events/propagation.cpp