On create button, switch Tablet to landscape mode

This commit is contained in:
Vladyslav Stelmakhovskyi 2017-05-30 16:51:04 +02:00
parent 66415dadc6
commit 0f80a8b7af
2 changed files with 7 additions and 7 deletions

View file

@ -564,6 +564,8 @@ var toolBar = (function () {
enabled: active
}));
isActive = active;
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!isActive) {
entityListTool.setVisible(false);
gridTool.setVisible(false);
@ -572,8 +574,8 @@ var toolBar = (function () {
selectionManager.clearSelections();
cameraManager.disable();
selectionDisplay.triggerMapping.disable();
tablet.landscape = false;
} else {
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
tablet.loadQMLSource("Edit.qml");
UserActivityLogger.enabledEdit();
entityListTool.setVisible(true);
@ -581,6 +583,8 @@ var toolBar = (function () {
grid.setEnabled(true);
propertiesTool.setVisible(true);
selectionDisplay.triggerMapping.enable();
print("starting tablet in landscape mode")
tablet.landscape = true;
// 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();

View file

@ -191,16 +191,12 @@
gTablet.updateAudioBar(currentMicLevel);
}
if (validCheckTime - now > MSECS_PER_SEC/4) {
//each 250ms should be just fine
if (now - validCheckTime > MSECS_PER_SEC) {
validCheckTime = now;
updateTabletWidthFromSettings();
if (UIWebTablet) {
UIWebTablet.setLandscape(landscape);
}
}
if (validCheckTime - now > MSECS_PER_SEC) {
validCheckTime = now;
if (tabletRezzed && UIWebTablet && !tabletIsValid()) {
// when we switch domains, the tablet entity gets destroyed and recreated. this causes
// the overlay to be deleted, but not recreated. If the overlay is deleted for this or any