Merge pull request #14789 from danteruiz/recenter-hmd-log-window

Case 20771: Make sure that the script log is in the correct location when switching to and from HMD
This commit is contained in:
Jeff Clinton 2019-01-29 13:03:43 -08:00 committed by GitHub
commit 08a3e65f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,14 +68,23 @@ var window = new OverlayWindow({
if (hasPosition) {
window.setPosition(windowX, windowY);
};
function recenterWindow() {
window.setPosition(100, 100);
}
window.visibleChanged.connect(function() {
if (!window.visible) {
window.setVisible(true);
recenterWindow();
}
});
HMD.displayModeChanged.connect(function(isHMDMode) {
recenterWindow();
});
window.closed.connect(function () { Script.stop(); });
function shouldLogMessage(scriptFileName) {