X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fbackgroundmgr.cpp;fp=src%2Fbackgroundmgr.cpp;h=52ee7965cf1fc8f8af3fd3e6f501930f7f94446c;hp=6d4a50cafd2ff13479b45be2c7432ee1bab600a9;hb=999a754d1519a49ca062ee87b22bf601c1ee9f21;hpb=d850a3477e9ccaecfa85e00bc619848fcc29bdb6 diff --git a/src/backgroundmgr.cpp b/src/backgroundmgr.cpp index 6d4a50c..52ee796 100644 --- a/src/backgroundmgr.cpp +++ b/src/backgroundmgr.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: backgroundmgr.cpp,v 1.15 2001/03/09 21:31:51 kevin Exp $ +** $Id: backgroundmgr.cpp,v 1.16 2001/03/11 06:34:37 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 @@ -67,6 +67,7 @@ BackgroundManager::BackgroundManager () m_sizeCell.Set (m_sizeGauge.x + m_sizeLabel.x + m_sizeCellSpacing.x + m_sizeButton.x, 25); + theApp->getMainFrame()->SetFocus(); Show(false); } @@ -150,9 +151,9 @@ BackgroundManager::OnAddTask (wxCommandEvent& event) resizeWindow(); if (m_iNumTasks == 1) { - SetFocus(); + theApp->getMainFrame()->SetFocus(); Show(true); - theApp->getMainFrame()->SetFocus(); // necessary to keep wxWindows from crashing + theApp->getMainFrame()->SetFocus(); } } @@ -186,8 +187,11 @@ BackgroundManager::OnRemoveTask (wxCommandEvent& event) } pSupervisor->ackRemoveBackgroundManager(); resizeWindow(); - if (m_iNumTasks <= 0) + if (m_iNumTasks <= 0) { + theApp->getMainFrame()->SetFocus(); Show(false); + theApp->getMainFrame()->SetFocus(); + } } void