mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
move logic for disconnecting out of initalize() and into setActive()
This commit is contained in:
parent
7a7438b648
commit
071396bed0
1 changed files with 8 additions and 5 deletions
|
@ -452,16 +452,15 @@ var toolBar = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearWindow() {
|
||||||
|
tablet.gotoHomeScreen();
|
||||||
|
};
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
Script.scriptEnding.connect(cleanup);
|
Script.scriptEnding.connect(cleanup);
|
||||||
Window.domainChanged.connect(function () {
|
Window.domainChanged.connect(function () {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
that.clearEntityList();
|
that.clearEntityList();
|
||||||
tablet.gotoHomeScreen();
|
|
||||||
});
|
|
||||||
|
|
||||||
Window.domainConnectionRefused.connect(function () {
|
|
||||||
tablet.gotoHomeScreen();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
||||||
|
@ -723,6 +722,8 @@ var toolBar = (function () {
|
||||||
cameraManager.disable();
|
cameraManager.disable();
|
||||||
selectionDisplay.triggerMapping.disable();
|
selectionDisplay.triggerMapping.disable();
|
||||||
tablet.landscape = false;
|
tablet.landscape = false;
|
||||||
|
Window.domainChanged.disconnect(clearWindow);
|
||||||
|
Window.domainConnectionRefused.disconnect(clearWindow);
|
||||||
} else {
|
} else {
|
||||||
tablet.loadQMLSource("hifi/tablet/Edit.qml", true);
|
tablet.loadQMLSource("hifi/tablet/Edit.qml", true);
|
||||||
UserActivityLogger.enabledEdit();
|
UserActivityLogger.enabledEdit();
|
||||||
|
@ -734,6 +735,8 @@ var toolBar = (function () {
|
||||||
print("starting tablet in landscape mode");
|
print("starting tablet in landscape mode");
|
||||||
tablet.landscape = true;
|
tablet.landscape = true;
|
||||||
entityIconOverlayManager.setIconsSelectable(null,false);
|
entityIconOverlayManager.setIconsSelectable(null,false);
|
||||||
|
Window.domainChanged.connect(clearWindow);
|
||||||
|
Window.domainConnectionRefused.connect(clearWindow);
|
||||||
// Not sure what the following was meant to accomplish, but it currently causes
|
// Not sure what the following was meant to accomplish, but it currently causes
|
||||||
// everybody else to think that Interface has lost focus overall. fogbugzid:558
|
// everybody else to think that Interface has lost focus overall. fogbugzid:558
|
||||||
// Window.setFocus();
|
// Window.setFocus();
|
||||||
|
|
Loading…
Reference in a new issue