Auto-select logged character's class on first Classes tab view

Only applies when no class has been manually selected yet in the
session; a manual selection is remembered across subsequent tab
switches.
This commit is contained in:
2026-07-08 00:44:48 +02:00
parent 5bbbcc7b5d
commit 87d9c83bdb
+6
View File
@@ -338,6 +338,12 @@ end)
AddClickSound(showAllButton) AddClickSound(showAllButton)
classesPanel:SetScript("OnShow", function() classesPanel:SetScript("OnShow", function()
if not selectedClass then
local _, ownClass = UnitClass("player")
if tabButtons[ownClass] then
selectedClass = ownClass
end
end
SelectClass(selectedClass or HideCoA.CUSTOM_CLASSES[1]) SelectClass(selectedClass or HideCoA.CUSTOM_CLASSES[1])
end) end)