projects
/
ctsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3b780a
)
r2106: *** empty log message ***
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Tue, 4 Jun 2002 19:24:03 +0000
(19:24 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Tue, 4 Jun 2002 19:24:03 +0000
(19:24 +0000)
src/docs.cpp
patch
|
blob
|
history
diff --git
a/src/docs.cpp
b/src/docs.cpp
index 7d8eb8820ec853654915917be0fa3dff297a5a65..2a340d18e758c850a3f7422dd8cef80f0b0b28d2 100644
(file)
--- a/
src/docs.cpp
+++ b/
src/docs.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: docs.cpp,v 1.4
1 2002/06/04 19:19:40
kevin Exp $
+** $Id: docs.cpp,v 1.4
2 2002/06/04 19:24:03
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
**
** 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
@@
-78,9
+78,9
@@
bool ImageFileDocument::OnOpenDocument(const wxString& constFilename)
wxString filename (constFilename);
wxString filename (constFilename);
- if (filename == szNEW_IMAGE_FILENAME)
{
+ if (filename == szNEW_IMAGE_FILENAME)
filename = "";
filename = "";
-
}
else if (! m_pImageFile->fileRead (filename.c_str())) {
+ else if (! m_pImageFile->fileRead (filename.c_str())) {
*theApp->getLog() << "Unable to read image file " << filename << "\n";
m_bBadFileOpen = true;
return false;
*theApp->getLog() << "Unable to read image file " << filename << "\n";
m_bBadFileOpen = true;
return false;
@@
-223,18
+223,24
@@
ProjectionFileDocument::~ProjectionFileDocument()
}
bool
}
bool
-ProjectionFileDocument::OnOpenDocument(const wxString&
f
ilename)
+ProjectionFileDocument::OnOpenDocument(const wxString&
constF
ilename)
{
if (! OnSaveModified())
return false;
{
if (! OnSaveModified())
return false;
- if (! m_pProjectionFile->read (filename.c_str())) {
+ wxString filename (constFilename);
+
+ if (filename == szNEW_PROJECTION_FILENAME)
+ filename = "";
+ else if (! m_pProjectionFile->read (filename.c_str())) {
*theApp->getLog() << "Unable to read projection file " << filename << "\n";
m_bBadFileOpen = true;
return false;
}
*theApp->getLog() << "Unable to read projection file " << filename << "\n";
m_bBadFileOpen = true;
return false;
}
- if (theApp->getVerboseLogging())
+
+ if (theApp->getVerboseLogging() && filename != "")
*theApp->getLog() << "Read projection file " << filename << "\n";
*theApp->getLog() << "Read projection file " << filename << "\n";
+
SetFilename(filename, true);
Modify(false);
getView()->setInitialClientSize();
SetFilename(filename, true);
Modify(false);
getView()->setInitialClientSize();
@@
-369,23
+375,28
@@
PlotFileDocument::OnSaveDocument(const wxString& filename)
}
bool
}
bool
-PlotFileDocument::OnOpenDocument(const wxString&
f
ilename)
+PlotFileDocument::OnOpenDocument(const wxString&
constF
ilename)
{
if (! OnSaveModified())
return false;
{
if (! OnSaveModified())
return false;
- if (! m_plot.fileRead (filename.c_str())) {
+ wxString filename (constFilename);
+
+ if (filename == szNEW_PLOT_FILENAME)
+ filename = "";
+ else if (! m_plot.fileRead (filename.c_str())) {
*theApp->getLog() << "Unable to read plot file " << filename << "\n";
m_bBadFileOpen = true;
return false;
}
*theApp->getLog() << "Unable to read plot file " << filename << "\n";
m_bBadFileOpen = true;
return false;
}
- if (theApp->getVerboseLogging())
+
+ if (theApp->getVerboseLogging() && filename != "")
*theApp->getLog() << "Read plot file " << filename << "\n";
*theApp->getLog() << "Read plot file " << filename << "\n";
+
SetFilename (filename, true);
m_namePlot = filename.c_str();
Modify (false);
UpdateAllViews();
SetFilename (filename, true);
m_namePlot = filename.c_str();
Modify (false);
UpdateAllViews();
- //GetFirstView()->OnUpdate (NULL, NULL);
m_bBadFileOpen = false;
return true;
m_bBadFileOpen = false;
return true;
@@
-448,7
+459,7
@@
TextFileDocument::OnOpenDocument(const wxString& filename)
SetFilename (filename, true);
Modify (false);
SetFilename (filename, true);
Modify (false);
-
//
UpdateAllViews();
+ UpdateAllViews();
m_bBadFileOpen = false;
return true;
}
m_bBadFileOpen = false;
return true;
}
@@
-510,7
+521,7
@@
Graph3dFileDocument::OnOpenDocument(const wxString& filename)
{
SetFilename (filename, true);
Modify (false);
{
SetFilename (filename, true);
Modify (false);
-
//
UpdateAllViews();
+ UpdateAllViews();
m_bBadFileOpen = false;
return true;
}
m_bBadFileOpen = false;
return true;
}