From abe8a3e6d9bc9d3ad52d55620b842dde2ca2c9f8 Mon Sep 17 00:00:00 2001 From: Liv Erickson Date: Tue, 17 Apr 2018 15:27:07 -0700 Subject: [PATCH] correct implementation that doesn't interfere with other app status --- scripts/system/edit.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index c3854ca80b..467842c712 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -452,13 +452,12 @@ var toolBar = (function () { } } - function clearWindow() { - tablet.gotoHomeScreen(); - }; - function initialize() { Script.scriptEnding.connect(cleanup); Window.domainChanged.connect(function () { + if (isActive) { + tablet.gotoHomeScreen(); + } that.setActive(false); that.clearEntityList(); }); @@ -722,8 +721,6 @@ var toolBar = (function () { cameraManager.disable(); selectionDisplay.triggerMapping.disable(); tablet.landscape = false; - Window.domainChanged.disconnect(clearWindow); - Window.domainConnectionRefused.disconnect(clearWindow); } else { tablet.loadQMLSource("hifi/tablet/Edit.qml", true); UserActivityLogger.enabledEdit(); @@ -735,8 +732,6 @@ var toolBar = (function () { print("starting tablet in landscape mode"); tablet.landscape = true; 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 // everybody else to think that Interface has lost focus overall. fogbugzid:558 // Window.setFocus();