Merge pull request #370 from skyedeving/fix-evidence-loading
Sort case evidence numerically before adding in
This commit is contained in:
commit
f77ae093e3
@ -58,6 +58,7 @@
|
|||||||
#include <QTextCharFormat>
|
#include <QTextCharFormat>
|
||||||
//#include <QRandomGenerator>
|
//#include <QRandomGenerator>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
class AOApplication;
|
class AOApplication;
|
||||||
|
@ -3588,7 +3588,15 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
new AOPacket("DE#" + QString::number(i) + "#%"));
|
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")
|
if (evi == "General")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user