Always call wxView::Close() when closing it.

After wxDocView refactoring the behaviour has changed and wxView::Close() and
hence user-overriddable OnClose() called from it) was only called if the close
event could be vetoed. This broke code which relied on OnClose() being
executed in any case to perform some cleanup and was incompatible with 2.8 so
restore the old behaviour now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-03-23 10:36:36 +00:00
parent 09783f72d4
commit cf30eac295

View File

@@ -1844,7 +1844,9 @@ bool wxDocChildFrameAnyBase::CloseView(wxCloseEvent& event)
{
if ( m_childView )
{
if ( event.CanVeto() && !m_childView->Close(false) )
// notice that we must call wxView::Close() and OnClose() called from
// it in any case, even if we know that we are going to close anyhow
if ( !m_childView->Close(false) && event.CanVeto() )
{
event.Veto();
return false;