From: Vadim Zeitlin Date: Fri, 23 Jul 2010 23:33:27 +0000 (+0000) Subject: No changes, just slightly improve docview sample code. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ab5259d977e4997c18b6c6b8f744b57e020d09c7 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 --- 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);