mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 22:39:18 +02:00
Update editEntities.js lock checking to use event instead of polling
This commit is contained in:
parent
a443157dd7
commit
26e3b331ee
1 changed files with 3 additions and 5 deletions
|
@ -406,13 +406,11 @@ var toolBar = (function () {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkForPermissionToEdit() {
|
Entities.canAdjustLocksChanged.connect(function(canAdjustLocks) {
|
||||||
if (isActive && !Entities.canAdjustLocks()) {
|
if (isActive && !canAdjustLocks) {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
Script.setInterval(checkForPermissionToEdit, 1000);
|
|
||||||
|
|
||||||
that.cleanup = function () {
|
that.cleanup = function () {
|
||||||
toolBar.cleanup();
|
toolBar.cleanup();
|
||||||
|
|
Loading…
Reference in a new issue