Main action bar does not switch page when entering a different combat stance.
danbar74 opened this issue ยท 4 comments
After installing v 1.2.0, main action bar shows always "caster" form actions, even after shifting to cat/bear form.
Thanks for the report - I have leveled a druid alt to 10 and yes, I can see that the main bar stays unchanged when switching to the bear stance.
I will investigate what causes that and keep you updated when I have a fix available.
I have identified the cause - it comes from changing the parent frame of action buttons from the main menu bar to a custom container, which I added to make it easier for me to hide them. I will work around that.
It will be fixed in the next update, very likely early next week in a patch with fixes and some more code cleanup.
Here's the cause:
CompactActionBar/Modules/LayoutManager/Classic.lua
Lines 165 to 182 in 1802d4a
CompactActionBar/Modules/LayoutManager/Classic.lua
Lines 221 to 226 in 1802d4a
I dived deeper into this and found that action buttons derive the ID of the currently shown page from their's parent frame. What I did to avoid changing the addon structure is hooking into a function called on the stance change, copy over actionpage
attribute to my custom frame for buttons, and then update the buttons - works flawlessly!
That fix will be included in the next version, will close the issue when it's out.
-- Fixes the bar not updating page with stance change
hooksecurefunc("ActionBarController_UpdateAll", function(force)
-- Get the actionpage from art frame and set it to buttons parent
self.CompactActionBarLeftBarFrame:SetAttribute("actionpage", MainMenuBarArtFrame:GetAttribute("actionpage"))
-- Force update on all action buttons
for k, Frame in pairs(ActionBarButtonEventsFrame.frames) do
ActionButton_UpdateAction(Frame, force);
end
end)
Tested the fix during a raid, it was causing some other errors. Decided to simply restore the way bars were hidden in prior versions, which works just fine.
This also affected rogue stealth stance, as confirmed by a guildie, and probably warrior battle stances too.
Version 1.2.1 fixes the problem.
If the bug reoccurs in the future, please reopen the issue!