Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all
Unified · Split
| @@ -4544,8 +4544,6 @@ void Application::init() { · 4543 unmodified lines | ||
| 4544 | 4544 | _physicsEngine->init(); |
| 4545 | 4545 | |
| 4546 | 4546 | EntityTreePointer tree = getEntities()->getTree(); |
| 4547 | − connect(tree.get(), &EntityTree::deletingEntity, this, &Application::deletingEntity, Qt::QueuedConnection); | |
| 4548 | − connect(tree.get(), &EntityTree::addingEntity, this, &Application::addingEntity, Qt::QueuedConnection); | |
| 4549 | 4547 | _entitySimulation->init(tree, _physicsEngine, &_entityEditSender); |
| 4550 | 4548 | tree->setSimulation(_entitySimulation); |
| 4551 | 4549 | |
| @@ -4879,14 +4877,16 @@ void Application::setKeyboardFocusEntity(const EntityItemID& entityItemID) { · 327 unmodified lines | ||
| 4879 | 4877 | auto entityId = _keyboardFocusedEntity.get(); |
| 4880 | 4878 | if (entities->wantsKeyboardFocus(entityId)) { |
| 4881 | 4879 | entities->setProxyWindow(entityId, _window->windowHandle()); |
| 4882 | − auto entity = getEntities()->getEntity(entityId); | |
| 4883 | 4880 | if (_keyboardMouseDevice->isActive()) { |
| 4884 | 4881 | _keyboardMouseDevice->pluginFocusOutEvent(); |
| 4885 | 4882 | } |
| 4886 | 4883 | _lastAcceptedKeyPress = usecTimestampNow(); |
| 4887 | 4884 | |
| 4888 | − setKeyboardFocusHighlight(entity->getWorldPosition(), entity->getWorldOrientation(), | |
| 4889 | − entity->getScaledDimensions() * FOCUS_HIGHLIGHT_EXPANSION_FACTOR); | |
| 4885 | + auto entity = getEntities()->getEntity(entityId); | |
| 4886 | + if (entity) { | |
| 4887 | + setKeyboardFocusHighlight(entity->getWorldPosition(), entity->getWorldOrientation(), | |
| 4888 | + entity->getScaledDimensions() * FOCUS_HIGHLIGHT_EXPANSION_FACTOR); | |
| 4889 | + } | |
| 4890 | 4890 | } |
| 4891 | 4891 | } |
| 4892 | 4892 | } |
| @@ -7675,12 +7675,4 @@ void Application::saveNextPhysicsStats(QString filename) { · 2782 unmodified lines | ||
| 7675 | 7675 | _physicsEngine->saveNextPhysicsStats(filename); |
| 7676 | 7676 | } |
| 7677 | 7677 | |
| 7678 | −void Application::addingEntity(const EntityItemID& entityID) { | |
| 7679 | − // TODO: Andrew to implement this | |
| 7680 | −} | |
| 7681 | − | |
| 7682 | −void Application::deletingEntity(const EntityItemID& entityID) { | |
| 7683 | − // TODO: Andrew to implement this | |
| 7684 | −} | |
| 7685 | − | |
| 7686 | 7678 | #include "Application.moc" |