Reset workspace index when clearing nodes

Fixes #4600
This commit is contained in:
Nick O'Leary 2024-03-21 11:14:34 +00:00
parent 179032cd4d
commit ae5e1570ae
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

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();