From 944734fed2d38ad47ed25a9d0f33d90b21b0eddb Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 18 Aug 2015 13:59:39 -0700 Subject: [PATCH] Remove focus highlight on delete entity --- interface/src/Application.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c9c3b94e03..a9997c7426 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -719,6 +719,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : } }); + connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, + [=](const EntityItemID& entityItemID) { + if (entityItemID == _keyboardFocusedItem) { + _keyboardFocusedItem = UNKNOWN_ENTITY_ID; + if (_keyboardFocusHighlight) { + _keyboardFocusHighlight->setVisible(false); + } + } + }); + // If the user clicks somewhere where there is NO entity at all, we will release focus connect(getEntities(), &EntityTreeRenderer::mousePressOffEntity, [=](const RayToEntityIntersectionResult& entityItemID, const QMouseEvent* event, unsigned int deviceId) {