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:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user