Skip to content

Commit

Permalink
Merge 07e161e into 563e2c2
Browse files Browse the repository at this point in the history
  • Loading branch information
jennuine authored Mar 24, 2021
2 parents 563e2c2 + 07e161e commit fd03ec9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/rendering/RenderUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2161,5 +2161,21 @@ void RenderUtil::ViewCollisions(const Entity &_entity)

this->dataPtr->viewingCollisions[colEntity] = showCol;
colVisual->SetVisible(showCol);

if (showCol)
{
// turn off wireboxes for collision entity except for most recent
// selected entity (it is still highlighted in entity tree)
if (this->dataPtr->wireBoxes.find(colEntity)
!= this->dataPtr->wireBoxes.end()
&& colEntity != this->dataPtr->selectedEntities.back())
{
ignition::rendering::WireBoxPtr wireBox =
this->dataPtr->wireBoxes[colEntity];
auto visParent = wireBox->Parent();
if (visParent)
visParent->SetVisible(false);
}
}
}
}

0 comments on commit fd03ec9

Please sign in to comment.