From ab5259d977e4997c18b6c6b8f744b57e020d09c7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 23 Jul 2010 23:33:27 +0000 Subject: [PATCH] No changes, just slightly improve docview sample code. Call the base class version of OnClose() in the derived classes instead of duplicating it. Closes #11363. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/docview/view.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp index 7906620797..b1c289339f 100644 --- a/samples/docview/view.cpp +++ b/samples/docview/view.cpp @@ -114,7 +114,7 @@ void DrawingView::OnUpdate(wxView* sender, wxObject* hint) // Clean up windows used for displaying the view. bool DrawingView::OnClose(bool deleteWindow) { - if ( !GetDocument()->Close() ) + if ( !wxView::OnClose(deleteWindow) ) return false; Activate(false); @@ -181,7 +181,7 @@ void TextEditView::OnDraw(wxDC *WXUNUSED(dc)) bool TextEditView::OnClose(bool deleteWindow) { - if ( !GetDocument()->Close() ) + if ( !wxView::OnClose(deleteWindow) ) return false; Activate(false); @@ -344,7 +344,7 @@ void ImageView::OnDraw(wxDC* dc) bool ImageView::OnClose(bool deleteWindow) { - if ( !GetDocument()->Close() ) + if ( !wxView::OnClose(deleteWindow) ) return false; Activate(false); -- 2.50.0