1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3253 from node-red/clear-disabled-status

Do not show status for disabled nodes
This commit is contained in:
Nick O'Leary 2021-11-22 23:24:18 +00:00 committed by GitHub
commit cd23b44506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -175,6 +175,7 @@ RED.sidebar.info.outliner = (function() {
n.d = true;
}
n.dirty = true;
n.dirtyStatus = true;
n.changed = true;
RED.events.emit("nodes:change",n);
groupHistoryEvent.events.push(historyEvent);
@ -203,6 +204,7 @@ RED.sidebar.info.outliner = (function() {
n.d = true;
}
n.dirty = true;
n.dirtyStatus = true;
n.changed = true;
RED.events.emit("nodes:change",n);
RED.history.push(historyEvent);

View File

@ -3675,7 +3675,11 @@ RED.view = (function() {
nodeEl = document.getElementById(d.id);
}
if (nodeEl) {
if (!showStatus || !d.status) {
// Do not show node status if:
// - global flag set
// - node has no status
// - node is disabled
if (!showStatus || !d.status || d.d === true) {
nodeEl.__statusGroup__.style.display = "none";
} else {
nodeEl.__statusGroup__.style.display = "inline";
@ -5032,6 +5036,7 @@ RED.view = (function() {
delete node.d;
}
node.dirty = true;
node.dirtyStatus = true;
node.changed = true;
RED.events.emit("nodes:change",node);
}