r601: no message
[ctsim.git] / src / threadrecon.cpp
index 2cd9dd1bda33475e1bbe711cb119d952d58440b6..7f4e9518ba30566c16d0b577b2c08aafadc86b89 100644 (file)
@@ -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.18 2001/03/04 04:16:20 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,26 +147,20 @@ ReconstructorSupervisor::onDone()
   wxCriticalSection doneSection;
   wxCriticalSectionLocker critsect (doneSection);
 
-  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()->SetFocus();
-    rasterView->getFrame()->Show(true);
-  }
-  *theApp->getLog() << m_pszLabel << "\n";
   pImageFile->labelAdd (m_pProjView->GetDocument()->getProjections().getLabel());
   pImageFile->labelAdd (m_pszLabel, getTimerEnd());
 
+  wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
+  wxString msg (m_pszLabel);
+  msg += "\n";
+  eventLog.SetString( msg );
+  wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
+
+  wxCommandEvent newImageEvent (wxEVT_COMMAND_MENU_SELECTED, NEW_IMAGEFILE_EVENT);
+  newImageEvent.SetClientData (pImageFile);
+  wxPostEvent (theApp->getMainFrame(), newImageEvent);
+
   setDone();
 }
 
@@ -274,3 +268,5 @@ void
 ReconstructorWorker::OnExit ()
 {
 }
+
+#endif // HAVE_WXTHREADS