X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadrecon.cpp;fp=src%2Fthreadrecon.cpp;h=c075fb426118ba04081c9bdaa4e95b82d99b4419;hp=2cd9dd1bda33475e1bbe711cb119d952d58440b6;hb=52f2fdc3424cd6b5b77ad1497243e1e06739ffe6;hpb=eb33bec27b609785c97a8cece532f2348989d308 diff --git a/src/threadrecon.cpp b/src/threadrecon.cpp index 2cd9dd1..c075fb4 100644 --- a/src/threadrecon.cpp +++ b/src/threadrecon.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadrecon.cpp,v 1.14 2001/02/27 03:59:30 kevin Exp $ +** $Id: threadrecon.cpp,v 1.15 2001/03/02 21:11:50 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 @@ -25,6 +25,7 @@ ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ + #include "wx/wxprec.h" #ifndef WX_PRECOMP @@ -39,9 +40,8 @@ #include "backgroundmgr.h" #include "backgroundsupr.h" -#if defined(HAVE_CONFIG_H) -#include "config.h" -#endif +#ifdef HAVE_WXTHREADS + @@ -147,16 +147,15 @@ ReconstructorSupervisor::onDone() wxCriticalSection doneSection; wxCriticalSectionLocker critsect (doneSection); + ImageFile* pImageFile = getImageFile(); + + wxMutexGuiEnter(); ImageFileDocument* pReconDoc = theApp->newImageDoc(); if (! pReconDoc) { sys_error (ERR_SEVERE, "Unable to create image file"); return; - } - - ImageFile* pImageFile = getImageFile(); + } pReconDoc->setImageFile (pImageFile); - if (theApp->getAskDeleteNewDocs()) - pReconDoc->Modify (true); pReconDoc->UpdateAllViews (m_pProjView); if (ImageFileView* rasterView = pReconDoc->getView()) { rasterView->OnUpdate (rasterView, NULL); @@ -164,6 +163,10 @@ ReconstructorSupervisor::onDone() rasterView->getFrame()->Show(true); } *theApp->getLog() << m_pszLabel << "\n"; + wxMutexGuiLeave(); + + if (theApp->getAskDeleteNewDocs()) + pReconDoc->Modify (true); pImageFile->labelAdd (m_pProjView->GetDocument()->getProjections().getLabel()); pImageFile->labelAdd (m_pszLabel, getTimerEnd()); @@ -274,3 +277,5 @@ void ReconstructorWorker::OnExit () { } + +#endif // HAVE_WXTHREADS