** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.cpp,v 1.13 2001/02/25 19:24:01 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
+
{
m_vecpChildImageFile.reserve (getNumWorkers());
for (unsigned int iThread = 0; iThread < getNumWorkers(); iThread++) {
- m_vecpChildImageFile[iThread] = new ImageFile (iImageNX, iImageNY);
+ m_vecpChildImageFile[iThread] = new ImageFile (m_iImageNX, m_iImageNY);
}
}
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