X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fentitycontainer.cpp;h=dc247e76ba736cce38e44cdb1201b0a927aed9c4;hb=5adb444f3e523d3fd028617ced72d1ea6661db21;hp=7babc889d54de73a4465a732d57777d8745b45bf;hpb=16354e0421b316a62c6b9f7b0b4f3b8cf6f06284;p=architektonas diff --git a/src/base/entitycontainer.cpp b/src/base/entitycontainer.cpp index 7babc88..dc247e7 100644 --- a/src/base/entitycontainer.cpp +++ b/src/base/entitycontainer.cpp @@ -123,13 +123,11 @@ void EntityContainer::detach() void EntityContainer::reparent(EntityContainer * parent) { - Entity::reparent(parent); + Entity::reparent(parent); - // All sub-entities: - for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone)) - { - e->reparent(parent); - } + // All sub-entities: + for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone)) + e->reparent(parent); } /** @@ -475,22 +473,22 @@ void EntityContainer::adjustBorders(Entity * entity) //DEBUG->print("EntityContainer::adjustBorders"); //resetBorders(); - if (entity != NULL) - { - // make sure a container is not empty (otherwise the border - // would get extended to 0/0): - if (!entity->isContainer() || entity->count() > 0) - { - minV = Vector::minimum(entity->getMin(), minV); - maxV = Vector::maximum(entity->getMax(), maxV); - } + if (entity == NULL) + return; - // Notify parents. The border for the parent might - // also change TODO: Check for efficiency - //if(parent!=NULL) { - //parent->adjustBorders(this); - //} + // make sure a container is not empty (otherwise the border + // would get extended to 0/0): + if (!entity->isContainer() || entity->count() > 0) + { + minV = Vector::minimum(entity->getMin(), minV); + maxV = Vector::maximum(entity->getMax(), maxV); } + + // Notify parents. The border for the parent might + // also change TODO: Check for efficiency + //if(parent!=NULL) { + //parent->adjustBorders(this); + //} } /**