Show changeset comments in the history dialogue
[potlatch2.git] / net / systemeD / halcyon / connection / Changeset.as
index dfb7d27..3f6ed61 100644 (file)
@@ -1,24 +1,26 @@
 package net.systemeD.halcyon.connection {
 
     public class Changeset extends Entity {
-        private var nodes:Array;
                public static var entity_type:String = 'changeset';
 
-        public function Changeset(id:Number, tags:Object) {
-            super(id, 0, tags, true, NaN, '');
+        public function Changeset(connection:Connection, id:Number, tags:Object) {
+            super(connection, id, 0, tags, true, NaN, null, null);
         }
 
         public override function toString():String {
             return "Changeset("+id+"): "+getTagList();
         }
 
-               public function isArea():Boolean {
-                       return (nodes[0].id==nodes[nodes.length-1].id  && nodes.length>2);
-               }
-
                public override function getType():String {
                        return 'changeset';
                }
+
+               public function get comment():String {
+                       var t:Object=getTagsHash();
+                       var s:String=t['comment'] ? t['comment'] : '';
+                       if (t['source']) { s+=" ["+t['source']+"]"; }
+                       return s;
+               }
     }
 
 }