From 8318d419cd75251f57f51f9988c2385aca82ee31 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 27 Jan 2001 03:39:53 +0000 Subject: [PATCH] r447: Fixed document closing when cancelling dialog during reconstruction/projectsions --- msvc/ctsim/ctsim.plg | 8 ++++---- src/views.cpp | 19 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index 7aa0160..e5faf80 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,13 +6,13 @@ --------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BC.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1C3.tmp" with contents [ /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\ctsim\src\views.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BC.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BD.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1C3.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1C4.tmp" with contents [ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib xpmd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib" .\Debug\ctsim.obj @@ -28,7 +28,7 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w \wx2\lib\wxd.lib \wx2\lib\xpmd.lib ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BD.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1C4.tmp"

Output Window

Compiling... views.cpp diff --git a/src/views.cpp b/src/views.cpp index 7b291a0..be956db 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.78 2001/01/27 03:08:16 kevin Exp $ +** $Id: views.cpp,v 1.79 2001/01/27 03:39:53 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 @@ -358,8 +358,7 @@ ImageFileView::OnCompare (wxCommandEvent& event) differenceImage.setArraySize (rIF.nx(), rIF.ny()); if (! rIF.subtractImages (rCompareIF, differenceImage)) { - pDifferenceDoc->Close(); - //pDifferenceDoc->DeleteAllViews(); + pDifferenceDoc->getView()->getFrame()->Close(true); return; } @@ -1811,8 +1810,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event) for (int iView = 0; iView < rProj.nView(); iView++) { ::wxYield(); if (dialogProjections.isCancelled() || ! dialogProjections.projectView (iView)) { - pProjectionDoc->Close(); - //pProjectionDoc->DeleteAllViews(); + pProjectionDoc->getView()->getFrame()->Close(true); return; } ::wxYield(); @@ -1826,8 +1824,7 @@ 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->Close(); - //pProjectionDoc->DeleteAllViews(); + pProjectionDoc->getView()->getFrame()->Close(true); return; } } @@ -1890,7 +1887,7 @@ PhantomFileView::OnRasterize (wxCommandEvent& event) rPhantom.convertToImagefile (imageFile, m_iDefaultRasterNSamples, Trace::TRACE_NONE, i, 1, true); if (! dlgProgress.Update(i+1)) { pRasterDoc->Close(); - //pRasterDoc->DeleteAllViews(); + pRasterDoc->getView()->getFrame()->Close(true); return; } } @@ -2276,8 +2273,7 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) { delete pDlgReconstruct; delete pReconstruct; - pReconDoc->Close(); - //pReconDoc->DeleteAllViews(); + pReconDoc->getView()->getFrame()->Close(true); return; } ::wxYield(); @@ -2294,8 +2290,7 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) pReconstruct->reconstructView (i, 1); if (! dlgProgress.Update(i + 1)) { delete pReconstruct; - pReconDoc->Close(); - //pReconDoc->DeleteAllViews(); + pReconDoc->getView()->getFrame()->Close(true); return; } } -- 2.34.1