From a8210b69bab19a398e37c8eebf82fad15d20e3e4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 7 Oct 2016 16:35:34 +0000 Subject: [PATCH] Information message when list of files to open has been exhausted. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7160 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 723e2b7b0..e59a872f6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2022,8 +2022,12 @@ void MainWindow::on_actionOpen_next_in_directory_triggered() //Open Next QFileInfo fi(m_path); QStringList list; list= fi.dir().entryList().filter(".wav",Qt::CaseInsensitive); - for (i = 0; i < list.size()-1; ++i) { - if(i==list.size()-2) m_loopall=false; + for (i = 0; i < list.size(); ++i) { + if(i==list.size()-1) { + m_loopall=false; + MessageBox::information_message(this, tr("No more files to open.")); + return; + } len=list.at(i).length(); if(list.at(i)==m_path.right(len)) { int n=m_path.length();