When connecting entities, don't reuse the target field to name the entity
authorJānis Rūcis <parasti@gmail.com>
Wed, 14 Jul 2010 01:34:43 +0000 (04:34 +0300)
committerJānis Rūcis <parasti@gmail.com>
Wed, 14 Jul 2010 01:41:03 +0000 (04:41 +0300)
If an entity already has a target field, chances are that the targeted
entity still exists and the mapper will just get a naming collision.

plugins/entity/entity.cpp

index ec02abd..36d7e91 100644 (file)
@@ -234,10 +234,6 @@ public:
     {
       ConnectEntities connector(e1, e2, index);
       const char* value = e2->getKeyValue("targetname");
-      if(string_empty(value))
-      {
-        value = e1->getKeyValue(connector.keyname());
-      }
       if(!string_empty(value))
       {
         connector.connect(value);