diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-08-04 22:16:39 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-08-04 22:16:39 -0500 |
| commit | 94ef8dffbc594585e6a47a79e008ec230934a9fe (patch) | |
| tree | cb681a59066990b59494dea29be1f6bc189873ea | |
| parent | 1ea43586d8eb304d8e91bf7f1480d7e4db5ef05f (diff) | |
List load order backups from most recent to oldest
| -rw-r--r-- | src/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f6cfbfbd..300c187e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -162,6 +162,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <boost/assign.hpp>
+#include <boost/range/adaptor/reversed.hpp>
#endif
#include <shlobj.h>
@@ -5135,7 +5136,7 @@ QString MainWindow::queryRestore(const QString &filePath) SelectionDialog dialog(tr("Choose backup to restore"), this);
QRegExp exp(pluginFileInfo.fileName() + PATTERN_BACKUP_REGEX);
QRegExp exp2(pluginFileInfo.fileName() + "\\.(.*)");
- for(const QFileInfo &info : files) {
+ for(const QFileInfo &info : boost::adaptors::reverse(files)) {
if (exp.exactMatch(info.fileName())) {
QDateTime time = QDateTime::fromString(exp.cap(1), PATTERN_BACKUP_DATE);
dialog.addChoice(time.toString(), "", exp.cap(1));
|
