r600: *** empty log message ***
[ctsim.git] / src / threadproj.cpp
index c4fa9aeabdbad87ae5b86a1c03bc09b4f90abd7c..1cc4bce8e9f74d6c66553a07cce61ad88373b0d5 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadproj.cpp,v 1.6 2001/03/01 07:30:49 kevin Exp $
+**  $Id: threadproj.cpp,v 1.9 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
 #include "wx/wx.h"
 #endif
 
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
 #include "ct.h"
 #include "ctsim.h"
 #include "docs.h"
@@ -39,9 +43,8 @@
 #include "backgroundmgr.h"
 #include "backgroundsupr.h"
 
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
+
 
 
 
@@ -150,26 +153,15 @@ ProjectorSupervisor::onDone()
   wxCriticalSection doneSection;
   wxCriticalSectionLocker critsect (doneSection);
 
-  ProjectionFileDocument* pProjDoc = theApp->newProjectionDoc();
-  if (! pProjDoc) {
-    sys_error (ERR_SEVERE, "Unable to create projection file");
-    return;
-  }
-    
   Projections* pProjections = getProjections();
-  pProjDoc->setProjections (pProjections);
-  if (theApp->getAskDeleteNewDocs())
-    pProjDoc->Modify (true);
-  pProjDoc->UpdateAllViews (NULL);
-  if (ProjectionFileView* projView = pProjDoc->getView()) {
-    projView->OnUpdate (projView, NULL);
-    projView->getFrame()->SetFocus();
-    projView->getFrame()->Show(true);
-  }
-  *theApp->getLog() << m_pszLabel << "\n";
   pProjections->setRemark (m_pszLabel);
   pProjections->setCalcTime (getTimerEnd());
+  //  *theApp->getLog() << m_pszLabel << "\n";
 
+  wxCommandEvent newProjEvent (wxEVT_COMMAND_MENU_SELECTED, NEW_PROJECTIONFILE_EVENT);
+  newImageEvent.SetClientData (pProjections);
+  wxPostEvent (theApp->getMainFrame(), newProjEvent);
+  
   setDone();
 }
 
@@ -274,3 +266,5 @@ void
 ProjectorWorker::OnExit ()
 {
 }
+
+#endif // HAVE_WXTHREADS