mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3199 from node-red/switch-project-fix
Fix switching projects
This commit is contained in:
commit
2f707a6b16
@ -2384,7 +2384,6 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
allNodes.clear();
|
|
||||||
links = [];
|
links = [];
|
||||||
linkTabMap = {};
|
linkTabMap = {};
|
||||||
nodeLinks = {};
|
nodeLinks = {};
|
||||||
@ -2405,6 +2404,8 @@ RED.nodes = (function() {
|
|||||||
initialLoad = null;
|
initialLoad = null;
|
||||||
workspaces = {};
|
workspaces = {};
|
||||||
|
|
||||||
|
allNodes.clear();
|
||||||
|
|
||||||
RED.nodes.dirty(false);
|
RED.nodes.dirty(false);
|
||||||
RED.view.redraw(true, true);
|
RED.view.redraw(true, true);
|
||||||
RED.palette.refresh();
|
RED.palette.refresh();
|
||||||
|
@ -252,6 +252,9 @@ var RED = (function() {
|
|||||||
if (/^#flow\/.+$/.test(currentHash)) {
|
if (/^#flow\/.+$/.test(currentHash)) {
|
||||||
RED.workspaces.show(currentHash.substring(6),true);
|
RED.workspaces.show(currentHash.substring(6),true);
|
||||||
}
|
}
|
||||||
|
if (RED.workspaces.active() === 0 && RED.workspaces.count() > 0) {
|
||||||
|
RED.workspaces.show(RED.nodes.getWorkspaceOrder()[0])
|
||||||
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
RED.notify(
|
RED.notify(
|
||||||
|
Loading…
Reference in New Issue
Block a user