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
1017}1017}
1018 1018
1019QObject* EntityScriptingInterface::getEntityObject(const QUuid& id) {1019QObject* EntityScriptingInterface::getEntityObject(const QUuid& id) {
1020 QObject* toReturn { nullptr };1020 return EntityTree::getEntityObject(id);
1021 _entityTree->withReadLock([&] {
1022 EntityItemPointer entity = _entityTree->findEntityByEntityItemID(id);
1023 if (entity) {
1024 toReturn = qobject_cast<QObject*>(&(*entity));
1025 }
1026 });
1027 return toReturn;
1028}1021}
1029 1022
1030bool EntityScriptingInterface::isLoaded(const QUuid& id) {1023bool EntityScriptingInterface::isLoaded(const QUuid& id) {