** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.89 2001/01/30 01:21:37 kevin Exp $
+** $Id: views.cpp,v 1.90 2001/01/30 02:20: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
bool
ImageFileView::OnClose (bool deleteWindow)
{
- GetDocumentManager()->ActivateView (this, false, true);
+ //GetDocumentManager()->ActivateView (this, false, true);
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (deleteWindow) {
m_pFrame->Destroy();
m_pFrame = NULL;
+ if (GetDocument() && GetDocument()->getBadFileOpen())
+ ::wxYield(); // wxWindows bug workaround
}
-
+
return true;
}
bool
PhantomFileView::OnClose (bool deleteWindow)
{
- GetDocumentManager()->ActivateView (this, false, true);
+ //GetDocumentManager()->ActivateView (this, false, true);
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (deleteWindow) {
m_pFrame->Destroy();
m_pFrame = NULL;
+ if (GetDocument() && GetDocument()->getBadFileOpen())
+ ::wxYield(); // wxWindows bug workaround
}
-// ::wxYield();
return true;
}
bool
ProjectionFileView::OnClose (bool deleteWindow)
{
- GetDocumentManager()->ActivateView (this, false, true);
+ //GetDocumentManager()->ActivateView (this, false, true);
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (deleteWindow) {
m_pFrame->Destroy();
m_pFrame = NULL;
+ if (GetDocument() && GetDocument()->getBadFileOpen())
+ ::wxYield(); // wxWindows bug workaround
}
return true;
bool
PlotFileView::OnClose (bool deleteWindow)
{
- GetDocumentManager()->ActivateView (this, false, true);
+ //GetDocumentManager()->ActivateView (this, false, true);
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (deleteWindow) {
m_pFrame->Destroy();
m_pFrame = NULL;
- }
+ if (GetDocument() && GetDocument()->getBadFileOpen())
+ ::wxYield(); // wxWindows bug workaround
+ }
return true;
}
// if (m_pFrame && m_pFrame->GetTitle() == "Log")
return false;
- GetDocumentManager()->ActivateView (this, false, true);
+ //GetDocumentManager()->ActivateView (this, false, true);
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (deleteWindow) {
m_pFrame->Destroy();
m_pFrame = NULL;
-
+ if (GetDocument() && GetDocument()->getBadFileOpen())
+ ::wxYield(); // wxWindows bug workaround
}
return TRUE;