mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Merge pull request #11187 from zfox23/context_removeWhenDeleting
Remove context overlay (if present) when removing entity
This commit is contained in:
commit
ee4a07b10d
2 changed files with 9 additions and 0 deletions
|
@ -55,6 +55,8 @@ ContextOverlayInterface::ContextOverlayInterface() {
|
|||
_contextOverlayJustClicked = false;
|
||||
}
|
||||
});
|
||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>().data();
|
||||
connect(entityScriptingInterface, &EntityScriptingInterface::deletingEntity, this, &ContextOverlayInterface::deletingEntity);
|
||||
}
|
||||
|
||||
static const uint32_t LEFT_HAND_HW_ID = 1;
|
||||
|
@ -278,3 +280,9 @@ void ContextOverlayInterface::disableEntityHighlight(const EntityItemID& entityI
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ContextOverlayInterface::deletingEntity(const EntityItemID& entityID) {
|
||||
if (_currentEntityWithContextOverlay == entityID) {
|
||||
destroyContextOverlay(_currentEntityWithContextOverlay, PointerEvent());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ private:
|
|||
void enableEntityHighlight(const EntityItemID& entityItemID);
|
||||
void disableEntityHighlight(const EntityItemID& entityItemID);
|
||||
|
||||
void deletingEntity(const EntityItemID& entityItemID);
|
||||
};
|
||||
|
||||
#endif // hifi_ContextOverlayInterface_h
|
||||
|
|
Loading…
Reference in a new issue