X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadproj.cpp;h=daf21d46c0fc944dcec75306b117d9e3a86bcb5c;hp=64216562ab82c04d1c5ec401ee30471db3067313;hb=7af7f4eb207891a4c0bfc60233b90847fd9b96cf;hpb=52f2fdc3424cd6b5b77ad1497243e1e06739ffe6 diff --git a/src/threadproj.cpp b/src/threadproj.cpp index 6421656..daf21d4 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.7 2001/03/02 21:11:50 kevin Exp $ +** $Id: threadproj.cpp,v 1.8 2001/03/02 21:32:34 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 @@ -155,7 +155,8 @@ ProjectorSupervisor::onDone() Projections* pProjections = getProjections(); - wxMutexGuiEnter(); + if (! wxThread::IsMain()) + wxMutexGuiEnter(); ProjectionFileDocument* pProjDoc = theApp->newProjectionDoc(); if (! pProjDoc) { sys_error (ERR_SEVERE, "Unable to create projection file"); @@ -169,7 +170,8 @@ ProjectorSupervisor::onDone() projView->getFrame()->Show(true); } *theApp->getLog() << m_pszLabel << "\n"; - wxMutexGuiLeave(); + if (! wxThread::IsMain()) + wxMutexGuiLeave(); if (theApp->getAskDeleteNewDocs()) pProjDoc->Modify (true);