Ensure recoverd nodes tab is added to outliner properly

This commit is contained in:
Nick O'Leary 2020-09-03 20:24:50 +01:00
parent 7bd0ca2212
commit dc8991a1da
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 9 additions and 4 deletions

View File

@ -971,10 +971,15 @@ RED.nodes = (function() {
// Hit the rare issue where node z values get set to 0.
// Repair the flow - but we really need to track that down.
if (!recoveryWorkspace) {
recoveryWorkspace = RED.workspaces.add(null,true);
recoveryWorkspace.label = RED._("clipboard.recoveredNodes");
recoveryWorkspace.info = RED._("clipboard.recoveredNodesInfo");
recoveryWorkspace = {
id: RED.nodes.id(),
type: "tab",
disabled: false,
label: RED._("clipboard.recoveredNodes"),
info: RED._("clipboard.recoveredNodesInfo")
}
addWorkspace(recoveryWorkspace);
RED.workspaces.add(recoveryWorkspace);
nodeZmap[recoveryWorkspace.id] = [];
}
n.z = recoveryWorkspace.id;