X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdlgreconstruct.cpp;h=277b6ea8bd41c11e17579e80a773916f1581d6f4;hp=e8e01e2872da6651b285191a5c8fb9d121506725;hb=c149735f56364c224ec6847d0f32ba06af86dc5b;hpb=bfcc769cf8019eabc8c65c07257c8dbee4b4c977 diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp index e8e01e2..277b6ea 100644 --- a/src/dlgreconstruct.cpp +++ b/src/dlgreconstruct.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dlgreconstruct.cpp,v 1.1 2000/09/02 05:13:57 kevin Exp $ +** $Id: dlgreconstruct.cpp,v 1.2 2000/09/02 16:40:36 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 @@ -145,7 +145,6 @@ void ReconstructDialog::showView (int iViewNumber) { if ( iViewNumber < m_rProjections.nView() ) { - wxYield(); // update the display m_iLastView = iViewNumber; m_pSGP->eraseWindow(); if (m_iTrace >= Trace::TRACE_PLOT) @@ -162,23 +161,20 @@ ReconstructDialog::showView (int iViewNumber) if (m_iTrace >= Trace::TRACE_PLOT) m_pSGP->setViewport (0, .1, 0.66, 1); m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP); - - ::wxYield(); - m_pDC->SelectObject (wxNullBitmap); - Refresh(); - m_pDC->SelectObject (m_bitmap); - ::wxYield(); } } bool ReconstructDialog::reconstructView (int iViewNumber) { + ::wxYield(); // update the display showView (iViewNumber); - wxYield(); // update the display - if (m_iTrace >= Trace::TRACE_PLOT) - sleep(1); - else { + ::wxYield(); // update the display + if (iViewNumber < m_rProjections.nView()) { + if (m_iTrace >= Trace::TRACE_PLOT) { + sleep(1); + } + } else { m_state = Finished; // so that we return TRUE below and } // that [Cancel] handler knew what to do @@ -186,6 +182,7 @@ ReconstructDialog::reconstructView (int iViewNumber) MacUpdateImmediately(); #endif + ::wxYield(); // update the display return m_state != Cancelled; }