Fix MS16480: Disable active ContextOverlays when disabling ContextOverlayInterface

This commit is contained in:
Zach Fox 2018-07-09 10:46:02 -07:00
parent d4f43a56f2
commit 01eb3eddab

View file

@ -97,6 +97,10 @@ static const float CONTEXT_OVERLAY_UNHOVERED_COLORPULSE = 1.0f;
void ContextOverlayInterface::setEnabled(bool enabled) {
_enabled = enabled;
if (!enabled) {
// Destroy any potentially-active ContextOverlays when disabling the interface
createOrDestroyContextOverlay(EntityItemID(), PointerEvent());
}
}
void ContextOverlayInterface::clickDownOnEntity(const EntityItemID& entityItemID, const PointerEvent& event) {