mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Merge pull request #15058 from SamGondelman/reload
Case 21490: Fix lasers and keyboard on reload
This commit is contained in:
commit
00ca3bc933
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<NodeList>()->reset(); // Force redownload of .fst models
|
||||||
|
|
||||||
|
DependencyManager::get<ScriptEngines>()->reloadAllScripts();
|
||||||
|
getOffscreenUI()->clearCache();
|
||||||
|
|
||||||
|
DependencyManager::get<Keyboard>()->createKeyboard();
|
||||||
|
|
||||||
getMyAvatar()->resetFullAvatarURL();
|
getMyAvatar()->resetFullAvatarURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,12 @@ void Keyboard::setUse3DKeyboard(bool use) {
|
||||||
void Keyboard::createKeyboard() {
|
void Keyboard::createKeyboard() {
|
||||||
auto pointerManager = DependencyManager::get<PointerManager>();
|
auto pointerManager = DependencyManager::get<PointerManager>();
|
||||||
|
|
||||||
|
if (_created) {
|
||||||
|
pointerManager->removePointer(_leftHandStylus);
|
||||||
|
pointerManager->removePointer(_rightHandStylus);
|
||||||
|
clearKeyboardKeys();
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap modelProperties {
|
QVariantMap modelProperties {
|
||||||
{ "url", MALLET_MODEL_URL }
|
{ "url", MALLET_MODEL_URL }
|
||||||
};
|
};
|
||||||
|
@ -289,6 +295,8 @@ void Keyboard::createKeyboard() {
|
||||||
loadKeyboardFile(keyboardSvg);
|
loadKeyboardFile(keyboardSvg);
|
||||||
|
|
||||||
_keySound = DependencyManager::get<SoundCache>()->getSound(SOUND_FILE);
|
_keySound = DependencyManager::get<SoundCache>()->getSound(SOUND_FILE);
|
||||||
|
|
||||||
|
_created = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Keyboard::isRaised() const {
|
bool Keyboard::isRaised() const {
|
||||||
|
|
|
@ -193,6 +193,8 @@ private:
|
||||||
|
|
||||||
QSet<QUuid> _itemsToIgnore;
|
QSet<QUuid> _itemsToIgnore;
|
||||||
std::vector<QHash<QUuid, Key>> _keyboardLayers;
|
std::vector<QHash<QUuid, Key>> _keyboardLayers;
|
||||||
|
|
||||||
|
bool _created { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue