** 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
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
+
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "backgroundmgr.h"
#include "backgroundsupr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
+
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);
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());
ReconstructorWorker::OnExit ()
{
}
+
+#endif // HAVE_WXTHREADS