review changes

This commit is contained in:
danteruiz 2019-02-28 18:11:51 -08:00
parent 9fe0309ae6
commit 7bcf727a83
2 changed files with 2 additions and 5 deletions

View file

@ -4980,9 +4980,8 @@ void Application::idle() {
}
{
if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_entityIdWaitingOnRenderable.get())) {
QUuid entityId = _entityIdWaitingOnRenderable.get();
_entityIdWaitingOnRenderable.set(UNKNOWN_ENTITY_ID);
if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_keyboardFocusedEntity.get())) {
QUuid entityId = _keyboardFocusedEntity.get();
setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
_keyboardFocusWaitingOnRenderable = false;
setKeyboardFocusEntity(entityId);
@ -5837,7 +5836,6 @@ void Application::setKeyboardFocusEntity(const QUuid& id) {
auto entityItemRenderable = entities->renderableForEntityId(entityId);
if (!entityItemRenderable) {
_keyboardFocusWaitingOnRenderable = true;
_entityIdWaitingOnRenderable.set(id);
} else if (entityItemRenderable->wantsKeyboardFocus()) {
entities->setProxyWindow(entityId, _window->windowHandle());
if (_keyboardMouseDevice->isActive()) {

View file

@ -733,7 +733,6 @@ private:
bool _reticleClickPressed { false };
bool _keyboardFocusWaitingOnRenderable { false };
ThreadSafeValueCache<EntityItemID> _entityIdWaitingOnRenderable;
int _avatarAttachmentRequest = 0;