Merge pull request #4619 from node-red/4600-reset-workspace-index

Reset workspace index when clearing nodes
This commit is contained in:
Nick O'Leary
2024-03-21 17:38:39 +00:00
committed by GitHub
3 changed files with 57 additions and 16 deletions

View File

@@ -491,6 +491,11 @@ RED.workspaces = (function() {
createWorkspaceTabs();
RED.events.on("sidebar:resize",workspace_tabs.resize);
RED.events.on("workspace:clear", () => {
// Reset the index used to generate new flow names
workspaceIndex = 0
})
RED.actions.add("core:show-next-tab",function() {
var oldActive = activeWorkspace;
workspace_tabs.nextTab();