Remove the tagDataProvider from TagViewer, since I think it's no longer used. TagGrid...
authorAndy Allan <gravitystorm@gmail.com>
Tue, 16 Nov 2010 18:39:19 +0000 (18:39 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 16 Nov 2010 18:39:19 +0000 (18:39 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index d10712a..fd68603 100644 (file)
 
       public var mapFeatures:MapFeatures;
       private var selectedEntity:Entity;
-      private var tagDataProvider:ArrayCollection;
       private var tw:CategorySelector = null;
       private var feature:Feature = null;
 
       
       private function tagChanged(event:TagEvent):void {
           refreshFeatureIcon();
-          
-          if ( tagDataProvider != null ) {
-              // check to see if the key is already in our list
-              var exists:Boolean = false;
-              var tag:Tag = null;
-              var i:uint;
-              for ( i = 0; i < tagDataProvider.length && !exists; i++ ) {
-                  tag = Tag(tagDataProvider.getItemAt(i));
-                  exists = tag.key == event.key;
-              }
-              if ( !exists ) {
-                  tag = new Tag(selectedEntity, event.key, event.newValue);
-                  tagDataProvider.addItem(tag);
-                  tagDataProvider.refresh();
-              } else {
-                  if ( event.newValue == null ) {
-                      tagDataProvider.removeItemAt(i-1);
-                      tagDataProvider.refresh();
-                  } else {
-                      tagDataProvider.itemUpdated(tag, "value");
-                  }
-              }
-          }
       }
 
       public function loadFeatures():void {