Merge pull request #15310 from danteruiz/fix-keyboard-scaling

Case 21513: Keyboad doesn't scale to avatar after reloading content
This commit is contained in:
Shannon Romano 2019-04-17 16:59:42 -07:00 committed by GitHub
commit 6c15719618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -910,6 +910,9 @@ void Keyboard::loadKeyboardFile(const QString& keyboardFile) {
});
_layerIndex = 0;
addIncludeItemsToMallets();
auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
scaleKeyboard(myAvatar->getSensorToWorldScale());
});
request->send();

View file

@ -98,6 +98,7 @@ public:
bool isPassword() const;
void setPassword(bool password);
void enableRightMallet();
void scaleKeyboard(float sensorToWorldScale);
void enableLeftMallet();
void disableRightMallet();
void disableLeftMallet();
@ -122,7 +123,6 @@ public slots:
void handleTriggerContinue(const QUuid& id, const PointerEvent& event);
void handleHoverBegin(const QUuid& id, const PointerEvent& event);
void handleHoverEnd(const QUuid& id, const PointerEvent& event);
void scaleKeyboard(float sensorToWorldScale);
private:
struct Anchor {