X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdocs.cpp;h=ac7e3a69c08b3c156767ecf13c70f3127e16b205;hb=65732cc5d8dbf867ed56a021c07c5636cea93b5a;hp=c3fd4892fd8747a0eb08adda81880eb0936f2703;hpb=89997e727ff5d4d8828f6fdaee435d809b623ffe;p=ctsim.git diff --git a/src/docs.cpp b/src/docs.cpp index c3fd489..ac7e3a6 100644 --- a/src/docs.cpp +++ b/src/docs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: docs.cpp,v 1.7 2000/12/19 21:37:51 kevin Exp $ +** $Id: docs.cpp,v 1.8 2000/12/27 03:16:02 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 @@ -201,6 +201,18 @@ void PhantomDocument::Modify(bool mod) IMPLEMENT_DYNAMIC_CLASS(PlotFileDocument, wxDocument) +bool PlotFileDocument::OnSaveDocument(const wxString& filename) +{ + m_namePlot = filename.c_str(); + if (! m_plot.fileWrite (filename)) { + *theApp->getLog() << "Unable to write plot file " << filename << "\n"; + return false; + } + *theApp->getLog() << "Wrote plot file " << filename << "\n"; + Modify(false); + return true; +} + bool PlotFileDocument::OnOpenDocument(const wxString& filename) { if (filename == "untitled.plt") { @@ -212,7 +224,8 @@ bool PlotFileDocument::OnOpenDocument(const wxString& filename) return false; } *theApp->getLog() << "Read plot file " << filename << "\n"; - SetFilename(filename, true); + SetFilename(filename, true); + m_namePlot = filename.c_str(); } Modify(false); UpdateAllViews();