** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadraster.cpp,v 1.1 2001/02/27 03:59:30 kevin Exp $
+** $Id: threadraster.cpp,v 1.2 2001/03/02 21:11:50 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
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
+
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "ctsim.h"
#include "docs.h"
#include "views.h"
+
+
+#ifdef HAVE_WXTHREADS
+
+
#include "threadraster.h"
#include "backgroundmgr.h"
#include "backgroundsupr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
-
-
/////////////////////////////////////////////////////////////////////
//
wxCriticalSection doneSection;
wxCriticalSectionLocker critsect (doneSection);
+ ImageFile* pImageFile = getImageFile();
+
+ wxMutexGuiEnter();
ImageFileDocument* pImageDoc = theApp->newImageDoc();
if (! pImageDoc) {
sys_error (ERR_SEVERE, "Unable to create image file");
return;
- }
-
- ImageFile* pImageFile = getImageFile();
+ }
pImageDoc->setImageFile (pImageFile);
- if (theApp->getAskDeleteNewDocs())
- pImageDoc->Modify (true);
pImageDoc->UpdateAllViews (NULL);
if (ImageFileView* imageView = pImageDoc->getView()) {
imageView->OnUpdate (imageView, NULL);
imageView->getFrame()->Show(true);
}
*theApp->getLog() << m_pszLabel << "\n";
+ wxMutexGuiLeave();
pImageFile->labelAdd (m_pszLabel, getTimerEnd());
+ if (theApp->getAskDeleteNewDocs())
+ pImageDoc->Modify (true);
setDone();
}
RasterizerWorker::OnExit ()
{
}
+
+#endif // HAVE_WXTHREADS