Skip to content

Commit

Permalink
Fix #5087 Connecting lines to targeted entities don't show up if 'Def…
Browse files Browse the repository at this point in the history
…ault' layer was hidden.

The target node was correctly moved into the owning node's layer set, but its visibility flags were not updated afterwards.
  • Loading branch information
codereader committed Dec 30, 2019
1 parent 84a966f commit 78d012f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions radiant/entity/target/TargetableNode.cpp
Expand Up @@ -123,10 +123,13 @@ void TargetableNode::onTargetKeyCollectionChanged()
if (!_targetLineNode)
{
_targetLineNode.reset(new TargetLineNode(_node));
scene::addNodeToContainer(_targetLineNode, _node.shared_from_this());


// Fix #4373: Move the target lines to the same layers as the owning node
_targetLineNode->assignToLayers(_node.getLayers());

// Add the target node as child to the owning node,
// this also updates its layer visibility flags
scene::addNodeToContainer(_targetLineNode, _node.shared_from_this());
}
}
else // No more targets
Expand Down

0 comments on commit 78d012f

Please sign in to comment.