X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=7b291a0188c256d6bd2cd7516979a608f450395d;hb=45397dc165b10a955712c851dba54da411f60dab;hp=e2c0c47e4a08c6fb72765ef1d720f0c78451742a;hpb=0c4d286b980e2d617b926f9dbea7572eaf1897cd;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index e2c0c47..7b291a0 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.76 2001/01/27 01:51:47 kevin Exp $ +** $Id: views.cpp,v 1.78 2001/01/27 03:08:16 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 @@ -224,7 +224,7 @@ EVT_MENU(IFMENU_PLOT_HISTOGRAM, ImageFileView::OnPlotHistogram) END_EVENT_TABLE() ImageFileView::ImageFileView() -: wxView(), m_pCanvas(NULL), m_pFrame(NULL), m_bMinSpecified(false), m_bMaxSpecified(false), m_pFileMenu(0) +: wxView(), m_pFrame(NULL), m_pCanvas(NULL), m_pFileMenu(0), m_bMinSpecified(false), m_bMaxSpecified(false) { m_iDefaultExportFormatID = ImageFile::FORMAT_PNG; } @@ -358,7 +358,8 @@ ImageFileView::OnCompare (wxCommandEvent& event) differenceImage.setArraySize (rIF.nx(), rIF.ny()); if (! rIF.subtractImages (rCompareIF, differenceImage)) { - pDifferenceDoc->DeleteAllViews(); + pDifferenceDoc->Close(); + //pDifferenceDoc->DeleteAllViews(); return; } @@ -1808,14 +1809,13 @@ PhantomFileView::OnProjections (wxCommandEvent& event) if (m_iDefaultTrace > Trace::TRACE_CONSOLE) { ProjectionsDialog dialogProjections (theScanner, rProj, rPhantom, m_iDefaultTrace, dynamic_cast(getFrameForChild())); for (int iView = 0; iView < rProj.nView(); iView++) { - ::wxYield(); ::wxYield(); if (dialogProjections.isCancelled() || ! dialogProjections.projectView (iView)) { - pProjectionDoc->DeleteAllViews(); + pProjectionDoc->Close(); + //pProjectionDoc->DeleteAllViews(); return; } ::wxYield(); - ::wxYield(); while (dialogProjections.isPaused()) { ::wxYield(); ::wxUsleep(50); @@ -1826,7 +1826,8 @@ PhantomFileView::OnProjections (wxCommandEvent& event) for (int i = 0; i < rProj.nView(); i++) { theScanner.collectProjections (rProj, rPhantom, i, 1, true, m_iDefaultTrace); if (! dlgProgress.Update (i+1)) { - pProjectionDoc->DeleteAllViews(); + pProjectionDoc->Close(); + //pProjectionDoc->DeleteAllViews(); return; } } @@ -1888,7 +1889,8 @@ PhantomFileView::OnRasterize (wxCommandEvent& event) for (unsigned int i = 0; i < imageFile.nx(); i++) { rPhantom.convertToImagefile (imageFile, m_iDefaultRasterNSamples, Trace::TRACE_NONE, i, 1, true); if (! dlgProgress.Update(i+1)) { - pRasterDoc->DeleteAllViews(); + pRasterDoc->Close(); + //pRasterDoc->DeleteAllViews(); return; } } @@ -2036,7 +2038,7 @@ PhantomFileView::OnClose (bool deleteWindow) if (m_pCanvas) { m_pCanvas->Clear(); m_pCanvas->setView(NULL); - m_pCanvas->Show(false); + m_pCanvas->Show(false); m_pCanvas = NULL; } wxString s(wxTheApp->GetAppName()); @@ -2274,7 +2276,8 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) { delete pDlgReconstruct; delete pReconstruct; - pReconDoc->DeleteAllViews(); + pReconDoc->Close(); + //pReconDoc->DeleteAllViews(); return; } ::wxYield(); @@ -2291,7 +2294,8 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) pReconstruct->reconstructView (i, 1); if (! dlgProgress.Update(i + 1)) { delete pReconstruct; - pReconDoc->DeleteAllViews(); + pReconDoc->Close(); + //pReconDoc->DeleteAllViews(); return; } }