r328: *** empty log message ***
[ctsim.git] / src / docs.cpp
index bab1d1348183eb7ce4e494c19740ae5fbbce665d..69b59544fc448f6afafff26201f94d69f5248170 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: docs.cpp,v 1.9 2000/12/29 15:45:06 kevin Exp $
+**  $Id: docs.cpp,v 1.10 2001/01/02 05:34:57 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,6 +180,17 @@ bool PhantomDocument::OnOpenDocument(const wxString& filename)
   return true;
 }
 
+bool PhantomDocument::OnSaveDocument(const wxString& filename)\r
+{\r
+  if (! m_phantom.fileWrite (filename.c_str())) {\r
+    *theApp->getLog() << "Unable to write phantom file " << filename << "\n";\r
+    return false;\r
+  }\r
+  *theApp->getLog() << "Wrote phantom file " << filename << "\n";\r
+  Modify(false);\r
+  return true;\r
+}\r
+\r
 bool PhantomDocument::OnCloseDocument ()
 {
   bool bReturn = wxDocument::OnCloseDocument();
@@ -229,6 +240,7 @@ bool PlotFileDocument::OnOpenDocument(const wxString& filename)
   }
   Modify (false);
   UpdateAllViews();\r
+  GetFirstView()->OnUpdate (NULL, NULL);\r
 
   return true;
 }