Prevented some unnecessary badge rendering.

This commit is contained in:
Leon Styhre 2022-09-16 19:25:38 +02:00
parent 4f88909eff
commit 3f9023885e
2 changed files with 2 additions and 2 deletions

View file

@ -183,7 +183,7 @@ const std::string BadgeComponent::getDisplayName(const std::string& shortName)
void BadgeComponent::render(const glm::mat4& parentTrans)
{
if (!isVisible() || mThemeOpacity == 0.0f)
if (!isVisible() || mFlexboxItems.empty() || mOpacity == 0.0f || mThemeOpacity == 0.0f)
return;
if (mOpacity * mThemeOpacity == 1.0f) {

View file

@ -34,7 +34,7 @@ FlexboxComponent::FlexboxComponent(std::vector<FlexboxItem>& items)
void FlexboxComponent::render(const glm::mat4& parentTrans)
{
if (!isVisible())
if (!isVisible() || mOpacity == 0.0f || mThemeOpacity == 0.0f)
return;
if (!mLayoutValid)