X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthreadproj.cpp;fp=src%2Fthreadproj.cpp;h=1cc4bce8e9f74d6c66553a07cce61ad88373b0d5;hb=8cce345df80fdbeea1c03a04a71d805951a87b74;hp=daf21d46c0fc944dcec75306b117d9e3a86bcb5c;hpb=7af7f4eb207891a4c0bfc60233b90847fd9b96cf;p=ctsim.git diff --git a/src/threadproj.cpp b/src/threadproj.cpp index daf21d4..1cc4bce 100644 --- a/src/threadproj.cpp +++ b/src/threadproj.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadproj.cpp,v 1.8 2001/03/02 21:32:34 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 @@ -154,30 +154,14 @@ ProjectorSupervisor::onDone() wxCriticalSectionLocker critsect (doneSection); Projections* pProjections = getProjections(); - - if (! wxThread::IsMain()) - wxMutexGuiEnter(); - ProjectionFileDocument* pProjDoc = theApp->newProjectionDoc(); - if (! pProjDoc) { - sys_error (ERR_SEVERE, "Unable to create projection file"); - return; - } - pProjDoc->setProjections (pProjections); - pProjDoc->UpdateAllViews (NULL); - if (ProjectionFileView* projView = pProjDoc->getView()) { - projView->OnUpdate (projView, NULL); - projView->getFrame()->SetFocus(); - projView->getFrame()->Show(true); - } - *theApp->getLog() << m_pszLabel << "\n"; - if (! wxThread::IsMain()) - wxMutexGuiLeave(); - - if (theApp->getAskDeleteNewDocs()) - pProjDoc->Modify (true); 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(); }