X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=1ed04087d2f2fd291e00892f40e6721d14c79382;hp=9d0314ac8b66e143b5fe169bd7f064a636aaedab;hb=516e7e87a069b938f325181d70c720c4c3fb8596;hpb=a84a77bb38a63834e944062d759fa7a1aa036967 diff --git a/src/views.cpp b/src/views.cpp index 9d0314a..1ed0408 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.72 2001/01/26 09:54:31 kevin Exp $ +** $Id: views.cpp,v 1.73 2001/01/26 21:22:37 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -239,6 +239,7 @@ ImageFileView::ImageFileView(void) ImageFileView::~ImageFileView(void) { + wxView::~wxView(); } void @@ -993,7 +994,7 @@ ImageFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) bool ImageFileView::OnClose (bool deleteWindow) { - if (!GetDocument()->Close()) + if (! GetDocument() || ! GetDocument()->Close()) return false; if (m_canvas) { @@ -1751,6 +1752,7 @@ PhantomFileView::PhantomFileView(void) PhantomFileView::~PhantomFileView() { + wxView::~wxView(); } void @@ -2022,7 +2024,7 @@ PhantomFileView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) bool PhantomFileView::OnClose (bool deleteWindow) { - if (!GetDocument()->Close()) + if (! GetDocument() || ! GetDocument()->Close()) return false; if (m_canvas) { @@ -2134,6 +2136,7 @@ ProjectionFileView::ProjectionFileView(void) ProjectionFileView::~ProjectionFileView(void) { + wxView::~wxView(); } void @@ -2485,7 +2488,7 @@ ProjectionFileView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) bool ProjectionFileView::OnClose (bool deleteWindow) { - if (!GetDocument()->Close()) + if (! GetDocument() || ! GetDocument()->Close()) return false; if (m_canvas) { @@ -2556,6 +2559,8 @@ PlotFileView::~PlotFileView(void) { if (m_pEZPlot) delete m_pEZPlot; + + wxView::~wxView(); } void @@ -2813,7 +2818,7 @@ PlotFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) bool PlotFileView::OnClose (bool deleteWindow) { - if (!GetDocument()->Close()) + if (! GetDocument() || ! GetDocument()->Close()) return false; if (m_canvas) { @@ -2843,6 +2848,7 @@ IMPLEMENT_DYNAMIC_CLASS(TextFileView, wxView) TextFileView::~TextFileView() { + wxView::~wxView(); } bool TextFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) @@ -2881,9 +2887,10 @@ void TextFileView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) bool TextFileView::OnClose (bool deleteWindow) { - return false; + if (m_pFrame->GetTitle() == "Log") + return false; - if (!GetDocument()->Close()) + if (! GetDocument() || ! GetDocument()->Close()) return false; Activate(false);