int ny = rIF.ny();
if (v != NULL && xCursor < nx) {
- double* pX = new double [ny];
- double* pYReal = new double [ny];
+ double* const pX = new double [ny];
+ double* const pYReal = new double [ny];
double* pYImag = NULL;
double* pYMag = NULL;
if (rIF.isComplex()) {
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Row " << yCursor;
+ os << "Row " << yCursor << ": ";
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
+ os << " FFT plot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Column " << xCursor;
+ os << "Column " << xCursor << ": ";
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << " FFT Plot of " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
+ os << " FFT plot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Column " << xCursor << " Comparison";
+ os << "Column " << xCursor << ": Comparison";
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
unsigned int iL;
for (iL = 0; iL < rIF.nLabels(); iL++) {
std::ostringstream os;
- os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
+ os << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str();
os << ": " << rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (os.str().c_str());
}
os << rCompareIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (os.str().c_str());
}
- os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str() << " and "
- << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
+ os << " between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << " and "
+ << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Row " << yCursor << " Comparison";
+ os << "Row " << yCursor << ": Comparison";
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
<< rCompareIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (os.str().c_str());
}
- os << " Between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << " and "
- << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().c_str();
+ os << " between " << dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8) << " and "
+ << dynamic_cast<wxFrame*>(pCompareDoc->GetFirstView()->GetFrame())->GetTitle().mb_str(wxConvUTF8);
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
PlotFileView::OnScaleMinMax (wxCommandEvent& event)
{
const PlotFile& rPlotFile = GetDocument()->getPlotFile();
- double min;
- double max;
+ double min, max;
if (! m_bMinSpecified || ! m_bMaxSpecified) {
if (! rPlotFile.getMinMax (1, min, max)) {
void
PlotFileView::OnScaleFull (wxCommandEvent& event)
{
- if (m_bMinSpecified || m_bMaxSpecified) {
- m_bMinSpecified = false;
- m_bMaxSpecified = false;
- OnUpdate (this, NULL);
+ const PlotFile& rPlotFile = GetDocument()->getPlotFile();
+ if (! rPlotFile.getMinMax (1, m_dMinPixel, m_dMaxPixel)) {
+ *theApp->getLog() << _T("Error: unable to find Min/Max\n");
+ return;
}
+
+ m_bMinSpecified = true;
+ m_bMaxSpecified = true;
+ OnUpdate (this, NULL);
GetDocument()->Activate();
}