From 5abc685b47c7ebd9e8713c087f8c4f00d9c27396 Mon Sep 17 00:00:00 2001 From: Skye Deving <76892045+skyedeving@users.noreply.github.com> Date: Mon, 4 Jan 2021 19:49:40 -0600 Subject: Sort case evidence numerically before adding in inventories get displayed lexigraphically too but it is assumed to not matter --- src/courtroom.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 95189112..bcff915d 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3588,7 +3588,15 @@ void Courtroom::on_ooc_return_pressed() new AOPacket("DE#" + QString::number(i) + "#%")); } - foreach (QString evi, casefile.childGroups()) { + // sort the case_evidence numerically + QStringList case_evidence = casefile.childGroups(); + std::sort(case_evidence.begin(), case_evidence.end(), + [] (const QString &a, const QString &b) { + return a.toInt() < b.toInt(); + }); + + // load evidence + foreach (QString evi, case_evidence) { if (evi == "General") continue; -- cgit