Don't allow <different> to be committed as a role
authorRichard Fairhurst <richard@systemeD.net>
Wed, 21 Nov 2012 18:22:04 +0000 (18:22 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Wed, 21 Nov 2012 18:22:04 +0000 (18:22 +0000)
net/systemeD/halcyon/connection/EntityCollection.as
net/systemeD/potlatch2/TagViewer.mxml

index 4530161..9f3f79d 100644 (file)
@@ -16,7 +16,7 @@ package net.systemeD.halcyon.connection {
                private var addedToRelationTimer:Timer;
                private var removedFromRelationTimer:Timer;
                private var delayedEvents:Array = [];
-               private static const DIFFERENT:String = "<different>";
+               public static const DIFFERENT:String = "<different>";
 
         public function EntityCollection(entities:Array) {
                        var conn:Connection=entities[0].connection;
index 31510af..8ae355b 100644 (file)
                var newRole:String=event.itemRenderer.data['role'];
 
                if (selectedEntity is EntityCollection) {
+                       if (newRole==EntityCollection.DIFFERENT) return;
                        for each (var entity:Entity in EntityCollection(selectedEntity).entities) {
                                var indexes:Array=relation.findEntityMemberIndexes(entity);
                                for each (var index:int in indexes) {