History

fix getEntityObject and tablet highlighting (Overlays.findOverlays)

SamGondelman committed 7 years ago

Commit 4b406bf1 parent 391cca75 files · +23 −8Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+1−8
@@ -1017,14 +1017,7 @@ QString EntityScriptingInterface::getEntityType(const QUuid& entityID) { · 1016 unmodified lines
10171017 }
10181018
10191019 QObject* EntityScriptingInterface::getEntityObject(const QUuid& id) {
1020− QObject* toReturn { nullptr };
1021− _entityTree->withReadLock([&] {
1022− EntityItemPointer entity = _entityTree->findEntityByEntityItemID(id);
1023− if (entity) {
1024− toReturn = qobject_cast<QObject*>(&(*entity));
1025− }
1026− });
1027− return toReturn;
1020+ return EntityTree::getEntityObject(id);
10281021 }
10291022
10301023 bool EntityScriptingInterface::isLoaded(const QUuid& id) {