Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#5584: Fix speaker and light volumes not always being rendered on sel…
…ection status change
  • Loading branch information
codereader committed Dec 11, 2021
1 parent dad2ec1 commit c446825
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions radiantcore/entity/light/LightNode.cpp
Expand Up @@ -589,6 +589,14 @@ void LightNode::onVisibilityChanged(bool isVisibleNow)
}
}

void LightNode::onSelectionStatusChange(bool changeGroupStatus)
{
EntityNode::onSelectionStatusChange(changeGroupStatus);

// Volume renderable is not always prepared for rendering, queue an update
_renderableLightVolume.queueUpdate();
}

void LightNode::onEntitySettingsChanged()
{
_showLightVolumeWhenUnselected = EntitySettings::InstancePtr()->getShowAllLightRadii();
Expand Down
1 change: 1 addition & 0 deletions radiantcore/entity/light/LightNode.h
Expand Up @@ -162,6 +162,7 @@ class LightNode :
void construct() override;

void onVisibilityChanged(bool isVisibleNow) override;
void onSelectionStatusChange(bool changeGroupStatus) override;

private:
void renderInactiveComponents(IRenderableCollector& collector, const VolumeTest& volume, const bool selected) const;
Expand Down
8 changes: 8 additions & 0 deletions radiantcore/entity/speaker/SpeakerNode.cpp
Expand Up @@ -448,4 +448,12 @@ void SpeakerNode::_applyTransformation()
freezeTransform();
}

void SpeakerNode::onSelectionStatusChange(bool changeGroupStatus)
{
EntityNode::onSelectionStatusChange(changeGroupStatus);

// Radius renderable is not always prepared for rendering, queue an update
_renderableRadiiWireframe.queueUpdate();
}

} // namespace entity
2 changes: 2 additions & 0 deletions radiantcore/entity/speaker/SpeakerNode.h
Expand Up @@ -136,6 +136,8 @@ class SpeakerNode final :
// Called after the constructor is done, overrides EntityNode
void construct() override;

void onSelectionStatusChange(bool changeGroupStatus) override;

private:
void evaluateTransform();
};
Expand Down

0 comments on commit c446825

Please sign in to comment.