mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge pull request #9853 from sethalves/tablet-ui-fix-edit-props-race
Tablet ui fix edit props race
This commit is contained in:
commit
524e4bdfbc
3 changed files with 13 additions and 5 deletions
|
@ -1548,7 +1548,7 @@ var PropertiesTool = function (opts) {
|
|||
});
|
||||
}
|
||||
|
||||
selectionManager.addEventListener(function (selectionUpdated) {
|
||||
function updateSelections(selectionUpdated) {
|
||||
var data = {
|
||||
type: 'update'
|
||||
};
|
||||
|
@ -1589,7 +1589,8 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
data.selections = selections;
|
||||
webView.emitScriptEvent(JSON.stringify(data));
|
||||
});
|
||||
}
|
||||
selectionManager.addEventListener(updateSelections);
|
||||
|
||||
webView.webEventReceived.connect(function (data) {
|
||||
try {
|
||||
|
@ -1751,6 +1752,8 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (data.type === "propertiesPageReady") {
|
||||
updateSelections(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1704,4 +1704,8 @@ function loaded() {
|
|||
document.addEventListener("contextmenu", function(event) {
|
||||
event.preventDefault();
|
||||
}, false);
|
||||
|
||||
setTimeout(function() {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'propertiesPageReady' }));
|
||||
}, 1000);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,9 @@
|
|||
function showTabletUI() {
|
||||
tabletShown = true;
|
||||
|
||||
if (!tabletRezzed) {
|
||||
rezTablet(false);
|
||||
if (!tabletRezzed || !tabletIsValid()) {
|
||||
closeTabletUI()
|
||||
rezTablet();
|
||||
}
|
||||
|
||||
if (UIWebTablet && tabletRezzed) {
|
||||
|
@ -199,7 +200,7 @@
|
|||
preMakeTime = now;
|
||||
if (!tabletIsValid()) {
|
||||
closeTabletUI();
|
||||
rezTablet(false);
|
||||
rezTablet();
|
||||
tabletShown = false;
|
||||
} else if (!tabletShown) {
|
||||
hideTabletUI();
|
||||
|
|
Loading…
Reference in a new issue