mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +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);
|
||||
});
|
||||
|
||||
function checkForPermissionToEdit() {
|
||||
if (isActive && !Entities.canAdjustLocks()) {
|
||||
Entities.canAdjustLocksChanged.connect(function(canAdjustLocks) {
|
||||
if (isActive && !canAdjustLocks) {
|
||||
that.setActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Script.setInterval(checkForPermissionToEdit, 1000);
|
||||
});
|
||||
|
||||
that.cleanup = function () {
|
||||
toolBar.cleanup();
|
||||
|
|
Loading…
Reference in a new issue