** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.cpp,v 1.16 2001/03/02 21:32:34 kevin Exp $
+** $Id: threadrecon.cpp,v 1.17 2001/03/04 03:14:47 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
wxCriticalSectionLocker critsect (doneSection);
ImageFile* pImageFile = getImageFile();
-
- if (! wxThread::IsMain())
- wxMutexGuiEnter();
- ImageFileDocument* pReconDoc = theApp->newImageDoc();
- if (! pReconDoc) {
- sys_error (ERR_SEVERE, "Unable to create image file");
- return;
- }
- pReconDoc->setImageFile (pImageFile);
- pReconDoc->UpdateAllViews (m_pProjView);
- if (ImageFileView* rasterView = pReconDoc->getView()) {
- rasterView->OnUpdate (rasterView, NULL);
- rasterView->getFrame()->SetFocus();
- rasterView->getFrame()->Show(true);
- }
- *theApp->getLog() << m_pszLabel << "\n";
- if (! wxThread::IsMain())
- wxMutexGuiLeave();
-
- if (theApp->getAskDeleteNewDocs())
- pReconDoc->Modify (true);
pImageFile->labelAdd (m_pProjView->GetDocument()->getProjections().getLabel());
pImageFile->labelAdd (m_pszLabel, getTimerEnd());
+ // *theApp->getLog() << m_pszLabel << "\n";
+
+ wxCommandEvent newImageEvent (wxEVT_COMMAND_MENU_SELECTED, NEW_IMAGEFILE_EVENT);
+ newImageEvent.SetClientData (pImageFile);
+ wxPostEvent (theApp->getMainFrame(), newImageEvent);
setDone();
}