** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundmgr.cpp,v 1.5 2001/02/23 21:58:31 kevin Exp $
+** $Id: backgroundmgr.cpp,v 1.6 2001/02/25 06:32:12 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 "ctsim.h"
#include "docs.h"
#include "views.h"
-#include "threadrecon.h"
+#include "backgroundsupr.h"
#include "backgroundmgr.h"
m_iNumTasks++;
resizeWindow();
- Show(true);
+ if (m_iNumTasks == 1) {
+ theApp->getMainFrame()->SetFocus(); // necessary to keep wxWindows from crashing
+ Show(true);
+ theApp->getMainFrame()->SetFocus(); // necessary to keep wxWindows from crashing
+ }
}
void
{
wxGauge* pGauge = NULL;
int i = 0;
+
+ wxCriticalSectionLocker locker (m_criticalSection);
for (TaskContainer::iterator iTask = m_vecpBackgroundTasks.begin(); iTask != m_vecpBackgroundTasks.end(); iTask++) {
if (*iTask == pTask) {
pGauge = m_vecpGauges[i];