aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2021-01-04 23:52:25 -0600
committerGitHub <noreply@github.com>2021-01-04 23:52:25 -0600
commitf77ae093e3d5fd86e029cb6309fa3ca34b84fddb (patch)
tree56287dde3681a86103709239f71a76207dec4cd7 /src
parent4d02cc8d680f4e069de0dddc8558ff9186153d59 (diff)
parent5abc685b47c7ebd9e8713c087f8c4f00d9c27396 (diff)
Merge pull request #370 from skyedeving/fix-evidence-loading
Sort case evidence numerically before adding in
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp10
1 files changed, 9 insertions, 1 deletions
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;