r600: *** empty log message ***
[ctsim.git] / src / threadrecon.cpp
index 3c0b223924917e67b351284e8228ca99d69ba4d7..66eb0474914b258f1d331a6f2d2dbdd2a436d46f 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -148,29 +148,13 @@ ReconstructorSupervisor::onDone()
   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();
 }