X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadraster.cpp;h=6602ccedc1f3a000ff01a7cc86032042757310a8;hp=252d6c592e9026d3bf98d8b6a2a3dbf5d2c7ce94;hb=7af7f4eb207891a4c0bfc60233b90847fd9b96cf;hpb=52f2fdc3424cd6b5b77ad1497243e1e06739ffe6 diff --git a/src/threadraster.cpp b/src/threadraster.cpp index 252d6c5..6602cce 100644 --- a/src/threadraster.cpp +++ b/src/threadraster.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadraster.cpp,v 1.2 2001/03/02 21:11:50 kevin Exp $ +** $Id: threadraster.cpp,v 1.3 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 @@ -142,7 +142,8 @@ RasterizerSupervisor::onDone() ImageFile* pImageFile = getImageFile(); - wxMutexGuiEnter(); + if (! wxThread::IsMain()) + wxMutexGuiEnter(); ImageFileDocument* pImageDoc = theApp->newImageDoc(); if (! pImageDoc) { sys_error (ERR_SEVERE, "Unable to create image file"); @@ -156,7 +157,8 @@ RasterizerSupervisor::onDone() imageView->getFrame()->Show(true); } *theApp->getLog() << m_pszLabel << "\n"; - wxMutexGuiLeave(); + if (! wxThread::IsMain()) + wxMutexGuiLeave(); pImageFile->labelAdd (m_pszLabel, getTimerEnd()); if (theApp->getAskDeleteNewDocs()) pImageDoc->Modify (true);