Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -719,6 +719,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 718 unmodified lines | ||
| 719 | 719 | } |
| 720 | 720 | }); |
| 721 | 721 | |
| 722 | + connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, | |
| 723 | + [=](const EntityItemID& entityItemID) { | |
| 724 | + if (entityItemID == _keyboardFocusedItem) { | |
| 725 | + _keyboardFocusedItem = UNKNOWN_ENTITY_ID; | |
| 726 | + if (_keyboardFocusHighlight) { | |
| 727 | + _keyboardFocusHighlight->setVisible(false); | |
| 728 | + } | |
| 729 | + } | |
| 730 | + }); | |
| 731 | + | |
| 722 | 732 | // If the user clicks somewhere where there is NO entity at all, we will release focus |
| 723 | 733 | connect(getEntities(), &EntityTreeRenderer::mousePressOffEntity, |
| 724 | 734 | [=](const RayToEntityIntersectionResult& entityItemID, const QMouseEvent* event, unsigned int deviceId) { |