mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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 () {
|
||||
that.setActive(false);
|
||||
that.clearEntityList();
|
||||
handleDomainChange();
|
||||
checkEditPermissionsAndUpdate();
|
||||
});
|
||||
|
||||
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
||||
if (isActive && !canAdjustLocks) {
|
||||
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 createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||
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
|
||||
function handleDomainChange() {
|
||||
function checkEditPermissionsAndUpdate() {
|
||||
if ( (createButton === null) || (createButton === undefined) ){
|
||||
//--EARLY EXIT--( nothing to safely update )
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue