History

maintain Space proxies for entities

Andrew Meadows committed 8 years ago

Commit e7495d81 parent 76d2e9b13 files · +75 −25Browse files

Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all

Unified · Split

interface/src/Application.cpp+5−13
@@ -4544,8 +4544,6 @@ void Application::init() { · 4543 unmodified lines
45444544 _physicsEngine->init();
45454545
45464546 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);
45494547 _entitySimulation->init(tree, _physicsEngine, &_entityEditSender);
45504548 tree->setSimulation(_entitySimulation);
45514549
@@ -4879,14 +4877,16 @@ void Application::setKeyboardFocusEntity(const EntityItemID& entityItemID) { · 327 unmodified lines
48794877 auto entityId = _keyboardFocusedEntity.get();
48804878 if (entities->wantsKeyboardFocus(entityId)) {
48814879 entities->setProxyWindow(entityId, _window->windowHandle());
4882− auto entity = getEntities()->getEntity(entityId);
48834880 if (_keyboardMouseDevice->isActive()) {
48844881 _keyboardMouseDevice->pluginFocusOutEvent();
48854882 }
48864883 _lastAcceptedKeyPress = usecTimestampNow();
48874884
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+ }
48904890 }
48914891 }
48924892 }
@@ -7675,12 +7675,4 @@ void Application::saveNextPhysicsStats(QString filename) { · 2782 unmodified lines
76757675 _physicsEngine->saveNextPhysicsStats(filename);
76767676 }
76777677
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−
76867678 #include "Application.moc"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t