X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fviews.cpp;h=ead413d04ddca300cd6ff14d54dda90a1ce35df8;hb=a2ac3119d9f9572f113b1f32d7be996dd49037ae;hp=f7898314fca127d73cc121433749e1c2a8867a87;hpb=73965da90e69db3b2c2aeab92fdab161b7291efe;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index f789831..ead413d 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -1624,7 +1624,7 @@ ImageFileView::OnPlotFFTRow (wxCommandEvent& event) 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 " << wxConvUTF8.cWX2MB(dynamic_cast(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()); + os << " FFT plot of " << wxConvUTF8.cWX2MB(dynamic_cast(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()); *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n"); rPlotFile.addDescription (os.str().c_str()); } @@ -1724,7 +1724,7 @@ ImageFileView::OnPlotFFTCol (wxCommandEvent& event) 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 " << wxConvUTF8.cWX2MB(dynamic_cast(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()); + os << " FFT plot of " << wxConvUTF8.cWX2MB(dynamic_cast(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str()); *theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n"); rPlotFile.addDescription (os.str().c_str()); } @@ -3346,8 +3346,7 @@ void 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)) { @@ -3376,11 +3375,15 @@ PlotFileView::OnScaleMinMax (wxCommandEvent& event) 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(); }