mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 22:06:18 +02:00
don't save tablet to Settings when logging out or switching domains
This commit is contained in:
parent
18e9b476c5
commit
47b59ffae3
3 changed files with 8 additions and 2 deletions
|
@ -796,8 +796,14 @@ void MyAvatar::saveData() {
|
|||
|
||||
settings.beginWriteArray("avatarEntityData");
|
||||
int avatarEntityIndex = 0;
|
||||
auto hmdInterface = DependencyManager::get<HMDScriptingInterface>();
|
||||
_avatarEntitiesLock.withReadLock([&] {
|
||||
for (auto entityID : _avatarEntityData.keys()) {
|
||||
if (hmdInterface->getCurrentTableUIID() == entityID) {
|
||||
// don't persist the tablet between domains / sessions
|
||||
continue;
|
||||
}
|
||||
|
||||
settings.setArrayIndex(avatarEntityIndex);
|
||||
settings.setValue("id", entityID);
|
||||
settings.setValue("properties", _avatarEntityData.value(entityID));
|
||||
|
|
|
@ -136,7 +136,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly) {
|
|||
this.state = "idle";
|
||||
|
||||
this.getRoot = function() {
|
||||
return Entities.getWebViewRoot(_this.webEntityID);
|
||||
return Entities.getWebViewRoot(_this.tabletEntityID);
|
||||
};
|
||||
|
||||
this.getLocation = function() {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
print("show tablet-ui");
|
||||
UIWebTablet = new WebTablet("qml/hifi/tablet/TabletRoot.qml", null, null, activeHand, true);
|
||||
UIWebTablet.register();
|
||||
HMD.tabletID = UIWebTablet.webEntityID;
|
||||
HMD.tabletID = UIWebTablet.tabletEntityID;
|
||||
}
|
||||
|
||||
function hideTabletUI() {
|
||||
|
|
Loading…
Reference in a new issue