mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:57:30 +02:00
remove old dependency on domain changed message to fix issue with edit icon not handling domain changes
This commit is contained in:
parent
86c9b8c61d
commit
6c1872caba
1 changed files with 1 additions and 7 deletions
|
@ -457,6 +457,7 @@ var toolBar = (function () {
|
||||||
Window.domainChanged.connect(function () {
|
Window.domainChanged.connect(function () {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
that.clearEntityList();
|
that.clearEntityList();
|
||||||
|
handleDomainChange();
|
||||||
});
|
});
|
||||||
|
|
||||||
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
Entities.canAdjustLocksChanged.connect(function (canAdjustLocks) {
|
||||||
|
@ -870,17 +871,12 @@ function handleMessagesReceived(channel, message, sender) {
|
||||||
handleOverlaySelectionToolUpdates( channel, message, sender );
|
handleOverlaySelectionToolUpdates( channel, message, sender );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Toolbar-DomainChanged': {
|
|
||||||
handleDomainChange();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
default: {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Messages.subscribe('Toolbar-DomainChanged');
|
|
||||||
Messages.subscribe("entityToolUpdates");
|
Messages.subscribe("entityToolUpdates");
|
||||||
Messages.messageReceived.connect(handleMessagesReceived);
|
Messages.messageReceived.connect(handleMessagesReceived);
|
||||||
|
|
||||||
|
@ -1314,8 +1310,6 @@ Script.scriptEnding.connect(function () {
|
||||||
|
|
||||||
Messages.messageReceived.disconnect(handleMessagesReceived);
|
Messages.messageReceived.disconnect(handleMessagesReceived);
|
||||||
Messages.unsubscribe("entityToolUpdates");
|
Messages.unsubscribe("entityToolUpdates");
|
||||||
// Messages.unsubscribe("Toolbar-DomainChanged"); // Do not unsubscribe because the shapes.js app also subscribes and
|
|
||||||
// Messages.subscribe works script engine-wide which would mess things up if they're both run in the same engine.
|
|
||||||
createButton = null;
|
createButton = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue