mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
make icon slightly more robust
This commit is contained in:
parent
6c1872caba
commit
e35efccfa3
1 changed files with 12 additions and 2 deletions
|
@ -457,15 +457,25 @@ var toolBar = (function () {
|
||||||
Window.domainChanged.connect(function () {
|
Window.domainChanged.connect(function () {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
that.clearEntityList();
|
that.clearEntityList();
|
||||||
handleDomainChange();
|
checkEditPermissionsAndUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
||||||
if (isActive && !canAdjustLocks) {
|
if (isActive && !canAdjustLocks) {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
|
tablet.gotoHomeScreen();
|
||||||
}
|
}
|
||||||
|
checkEditPermissionsAndUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Entities.canRezChanged.connect(function (canRez) {
|
||||||
|
if (isActive && !canRez) {
|
||||||
|
that.setActive(false);
|
||||||
|
tablet.gotoHomeScreen();
|
||||||
|
}
|
||||||
|
checkEditPermissionsAndUpdate();
|
||||||
|
})
|
||||||
|
|
||||||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
||||||
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
|
@ -852,7 +862,7 @@ function handleOverlaySelectionToolUpdates(channel, message, sender) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handles any edit mode updates required when domains have switched
|
// Handles any edit mode updates required when domains have switched
|
||||||
function handleDomainChange() {
|
function checkEditPermissionsAndUpdate() {
|
||||||
if ( (createButton === null) || (createButton === undefined) ){
|
if ( (createButton === null) || (createButton === undefined) ){
|
||||||
//--EARLY EXIT--( nothing to safely update )
|
//--EARLY EXIT--( nothing to safely update )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue