mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 20:50:27 +02:00
fix lasers and keyboard on reload
This commit is contained in:
parent
72f198fe00
commit
15064f0097
3 changed files with 15 additions and 0 deletions
|
@ -5770,6 +5770,11 @@ void Application::reloadResourceCaches() {
|
|||
|
||||
DependencyManager::get<NodeList>()->reset(); // Force redownload of .fst models
|
||||
|
||||
DependencyManager::get<ScriptEngines>()->reloadAllScripts();
|
||||
getOffscreenUI()->clearCache();
|
||||
|
||||
DependencyManager::get<Keyboard>()->createKeyboard();
|
||||
|
||||
getMyAvatar()->resetFullAvatarURL();
|
||||
}
|
||||
|
||||
|
|
|
@ -259,6 +259,12 @@ void Keyboard::setUse3DKeyboard(bool use) {
|
|||
void Keyboard::createKeyboard() {
|
||||
auto pointerManager = DependencyManager::get<PointerManager>();
|
||||
|
||||
if (_created) {
|
||||
pointerManager->removePointer(_leftHandStylus);
|
||||
pointerManager->removePointer(_rightHandStylus);
|
||||
clearKeyboardKeys();
|
||||
}
|
||||
|
||||
QVariantMap modelProperties {
|
||||
{ "url", MALLET_MODEL_URL }
|
||||
};
|
||||
|
@ -289,6 +295,8 @@ void Keyboard::createKeyboard() {
|
|||
loadKeyboardFile(keyboardSvg);
|
||||
|
||||
_keySound = DependencyManager::get<SoundCache>()->getSound(SOUND_FILE);
|
||||
|
||||
_created = true;
|
||||
}
|
||||
|
||||
bool Keyboard::isRaised() const {
|
||||
|
|
|
@ -193,6 +193,8 @@ private:
|
|||
|
||||
QSet<QUuid> _itemsToIgnore;
|
||||
std::vector<QHash<QUuid, Key>> _keyboardLayers;
|
||||
|
||||
bool _created { false };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue