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
This commit is contained in:
@@ -114,7 +114,7 @@ void DrawingView::OnUpdate(wxView* sender, wxObject* hint)
|
|||||||
// Clean up windows used for displaying the view.
|
// Clean up windows used for displaying the view.
|
||||||
bool DrawingView::OnClose(bool deleteWindow)
|
bool DrawingView::OnClose(bool deleteWindow)
|
||||||
{
|
{
|
||||||
if ( !GetDocument()->Close() )
|
if ( !wxView::OnClose(deleteWindow) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Activate(false);
|
Activate(false);
|
||||||
@@ -181,7 +181,7 @@ void TextEditView::OnDraw(wxDC *WXUNUSED(dc))
|
|||||||
|
|
||||||
bool TextEditView::OnClose(bool deleteWindow)
|
bool TextEditView::OnClose(bool deleteWindow)
|
||||||
{
|
{
|
||||||
if ( !GetDocument()->Close() )
|
if ( !wxView::OnClose(deleteWindow) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Activate(false);
|
Activate(false);
|
||||||
@@ -344,7 +344,7 @@ void ImageView::OnDraw(wxDC* dc)
|
|||||||
|
|
||||||
bool ImageView::OnClose(bool deleteWindow)
|
bool ImageView::OnClose(bool deleteWindow)
|
||||||
{
|
{
|
||||||
if ( !GetDocument()->Close() )
|
if ( !wxView::OnClose(deleteWindow) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Activate(false);
|
Activate(false);
|
||||||
|
Reference in New Issue
Block a user