X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fbackgroundmgr.cpp;h=275f20bd01c8f2ee4e4d9825bf1db6ddb474e374;hp=6d4a50cafd2ff13479b45be2c7432ee1bab600a9;hb=d16eb37cbc73f67fc29a60645e0b1ac7fe32767e;hpb=841cd96a9faa03494c7841877a7f008c019fed9e diff --git a/src/backgroundmgr.cpp b/src/backgroundmgr.cpp index 6d4a50c..275f20b 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.20 2001/03/18 18:08:26 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,8 @@ BackgroundManager::OnAddTask (wxCommandEvent& event) resizeWindow(); if (m_iNumTasks == 1) { - SetFocus(); + m_pCanvas->SetFocus(); Show(true); - theApp->getMainFrame()->SetFocus(); // necessary to keep wxWindows from crashing } } @@ -186,8 +186,10 @@ BackgroundManager::OnRemoveTask (wxCommandEvent& event) } pSupervisor->ackRemoveBackgroundManager(); resizeWindow(); - if (m_iNumTasks <= 0) + if (m_iNumTasks <= 0) { + m_pCanvas->SetFocus(); Show(false); + } } void