Sort traces in descending order by id, rather than whatever order they happen to...
authorAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 17:20:00 +0000 (17:20 +0000)
committerAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 17:20:00 +0000 (17:20 +0000)
net/systemeD/potlatch2/mygpx/MyGpxDialog.mxml

index 019ab46..0152262 100644 (file)
 
     [Bindable(event="traces_loaded")]
     private function get traces():VectorCollection {
-               return new VectorCollection(conn.getTraces());
+               return new VectorCollection(conn.getTraces().sort(f).reverse());
+    }
+
+    private function f(a:Trace, b:Trace):int {
+        return a.id - b.id
     }
 
     public function loadFile(t:Trace):void {