Sort case evidence numerically before adding in
inventories get displayed lexigraphically too but it is assumed to not matter
This commit is contained in:
		
							parent
							
								
									4d02cc8d68
								
							
						
					
					
						commit
						5abc685b47
					
				@ -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