r584: no message
[ctsim.git] / src / docs.cpp
index 99e6a56e9c9245d5cda5b1b88b8a840db209fdee..96f7ee3c2ae793d842e34f91a0fce7abdb99b47f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: docs.cpp,v 1.29 2001/02/25 10:52:55 kevin Exp $
+**  $Id: docs.cpp,v 1.30 2001/02/25 16:21:36 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
@@ -180,8 +180,8 @@ BackgroundProcessingDocument::cancelRunningTasks()
   m_criticalSection.Leave();
 
   while (m_vecpBackgroundSupervisors.size() > 0) {
-     ::wxUsleep(50);
      ::wxYield();
+     ::wxUsleep(50);
   }
 }
 
@@ -255,6 +255,11 @@ ProjectionFileDocument::getView() const
 
 IMPLEMENT_DYNAMIC_CLASS(PhantomFileDocument, BackgroundProcessingTask)
 
+PhantomFileDocument::~PhantomFileDocument()
+{
+  cancelRunningTasks();
+}
+
 bool 
 PhantomFileDocument::OnOpenDocument(const wxString& filename)
 {