CR feedback

This commit is contained in:
ZappoMan 2013-05-22 14:13:38 -07:00
parent cb96b34f9a
commit 47c4ff887e

View file

@ -424,15 +424,13 @@ void VoxelTree::reaverageVoxelColors(VoxelNode *startNode) {
} }
} }
if (hasChildren) { // collapseIdenticalLeaves() returns true if it collapses the leaves
bool childrenCollapsed = startNode->collapseIdenticalLeaves(); // in which case we don't need to set the average color
if (hasChildren && !startNode->collapseIdenticalLeaves()) {
if (!childrenCollapsed) {
startNode->setColorFromAverageOfChildren(); startNode->setColorFromAverageOfChildren();
} }
} }
} }
}
void VoxelTree::loadVoxelsFile(const char* fileName, bool wantColorRandomizer) { void VoxelTree::loadVoxelsFile(const char* fileName, bool wantColorRandomizer) {
int vCount = 0; int vCount = 0;