X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=7e6de1d411250a42918c0336e38a3667429935d6;hp=3411a45f67061e52f7970f54c35baff9149db003;hb=e89023477e02d9332f87cab5a7975407625dbd60;hpb=e8462f7431582627e44906239077f1c696eefba1 diff --git a/src/views.cpp b/src/views.cpp index 3411a45..7e6de1d 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -340,7 +340,7 @@ ImageFileView::OnScaleMinMax (wxCommandEvent& event) { const ImageFile& rIF = GetDocument()->getImageFile(); double min, max; - if (! m_bMinSpecified && ! m_bMaxSpecified) + if (! m_bMinSpecified || ! m_bMaxSpecified) rIF.getMinMax (min, max); if (m_bMinSpecified) @@ -1312,7 +1312,7 @@ ImageFileView::OnExport (wxCommandEvent& event) const wxString& strFilename = wxFileSelector (_T("Export Filename"), _T(""), _T(""), strExt, strWildcard, wxFD_OVERWRITE_PROMPT | wxFD_SAVE); - if (strFilename.Length() > 0) { + if (! strFilename.empty()) { rIF.exportImage (strFormatName.mb_str(wxConvUTF8), strFilename.mb_str(wxConvUTF8), 1, 1, m_dMinPixel, m_dMaxPixel); *theApp->getLog() << _T("Exported file ") << strFilename << _T("\n"); }