Fix switchTab usage of tabOrder

This commit is contained in:
Ben 2024-06-01 16:49:01 +02:00
parent 7413d5427c
commit 89f6ccb87b
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -49,7 +49,12 @@ local function switchTab()
local idx = 0 local idx = 0
if currentTab ~= nil then if currentTab ~= nil then
currentTab.window.setVisible(false) currentTab.window.setVisible(false)
idx = tabOrder[currentTab.name] for i, name in pairs(tabOrder) do
if name == currentTab.name then
idx = i
break
end
end
end end
idx = idx + 1 idx = idx + 1
if idx > tabCount then if idx > tabCount then