History

fixing login dialog

danteruiz committed 7 years ago

Commit 2fd94c61 parent 92168f62 files · +15 −2Browse files

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

Unified · Split

interface/src/Application.cpp+14−2
@@ -4979,6 +4979,15 @@ void Application::idle() { · 4978 unmodified lines
49794979 }
49804980 }
49814981
4982+ {
4983+ if (_keyboardFocusWaitingOnRenderable && getEntities()->renderableForEntityId(_keyboardFocusedEntity.get())) {
4984+ _keyboardFocusWaitingOnRenderable = false;
4985+ QUuid entityId = _keyboardFocusedEntity.get();
4986+ setKeyboardFocusEntity(UNKNOWN_ENTITY_ID);
4987+ setKeyboardFocusEntity(entityId);
4988+ }
4989+ }
4990+
49824991 {
49834992 PerformanceTimer perfTimer("pluginIdle");
49844993 PerformanceWarning warn(showWarnings, "Application::idle()... pluginIdle()");
@@ -5807,7 +5816,7 @@ void Application::setKeyboardFocusEntity(const QUuid& id) { · 822 unmodified lines
58075816 if (qApp->getLoginDialogPoppedUp() && !_loginDialogID.isNull()) {
58085817 if (id == _loginDialogID) {
58095818 emit loginDialogFocusEnabled();
5810− } else {
5819+ } else if (!_keyboardFocusWaitingOnRenderable) {
58115820 // that's the only entity we want in focus;
58125821 return;
58135822 }
@@ -5824,7 +5833,10 @@ void Application::setKeyboardFocusEntity(const QUuid& id) { · 10 unmodified lines
58245833 if (properties.getVisible()) {
58255834 auto entities = getEntities();
58265835 auto entityId = _keyboardFocusedEntity.get();
5827− if (entities->wantsKeyboardFocus(entityId)) {
5836+ auto entityItemRenderable = entities->renderableForEntityId(entityId);
5837+ if (!entityItemRenderable) {
5838+ _keyboardFocusWaitingOnRenderable = true;
5839+ } else if (entityItemRenderable->wantsKeyboardFocus()) {
58285840 entities->setProxyWindow(entityId, _window->windowHandle());
58295841 if (_keyboardMouseDevice->isActive()) {
58305842 _keyboardMouseDevice->pluginFocusOutEvent();

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