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

Do not show status for disabled nodes

Fixes #3249
This commit is contained in:
Nick O'Leary 2021-11-08 21:12:13 +00:00
parent 3e0f080ea7
commit bfe0d3b8a3
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
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";
@ -5029,6 +5033,7 @@ RED.view = (function() {
delete node.d;
}
node.dirty = true;
node.dirtyStatus = true;
node.changed = true;
RED.events.emit("nodes:change",node);
}