diff options
author | Wieland Hagen <wieland.hagen@kdab.com> | 2016-12-28 18:44:33 +0700 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2017-01-05 08:45:00 +0000 |
commit | 8d019d65173cf885cc2995bbd6820a9148d49a8f (patch) | |
tree | b0dd6a63af2d680898b2e488b710e43e45ce316d /src/render/jobs/filterlayerentityjob.cpp | |
parent | f4ad38facc1a7c4f4f0239f808183b3c24e037ba (diff) |
Correct filtering of disabled entities
FilterLayerEntityJob would not check for the enabled-ness of
parent entities, if present.
We introduce another job that checks for each entity, whether
it is enabled or not. Jobs that need to access this flag must
take care to add a dependency on the UpdateTreeEnabledJob
Task-number: QTBUG-56235
Change-Id: Ic087fc8e9efdd4829cdb18ae3e8430344f6ecf43
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/jobs/filterlayerentityjob.cpp')
-rw-r--r-- | src/render/jobs/filterlayerentityjob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/jobs/filterlayerentityjob.cpp b/src/render/jobs/filterlayerentityjob.cpp index 3f1a04785..5e1add275 100644 --- a/src/render/jobs/filterlayerentityjob.cpp +++ b/src/render/jobs/filterlayerentityjob.cpp @@ -91,7 +91,7 @@ void FilterLayerEntityJob::filterLayerAndEntity() for (const HEntity handle : handles) { Entity *entity = entityManager->data(handle); - if (!entity->isEnabled()) + if (!entity->isTreeEnabled()) continue; const Qt3DCore::QNodeIdVector entityLayers = entity->componentsUuid<Layer>(); @@ -117,7 +117,7 @@ void FilterLayerEntityJob::selectAllEntities() m_filteredEntities.reserve(handles.size()); for (const HEntity handle : handles) { Entity *e = entityManager->data(handle); - if (e->isEnabled()) + if (e->isTreeEnabled()) m_filteredEntities.push_back(e); } } |