Mouseover Action Settings - Automatic UI Fader

Mouseover Action Settings - Automatic UI Fader

181k Downloads

Settings set to true in DB.lua get set back to true automatically on reload?

AntoineBnl opened this issue ยท 8 comments

commented

Hey there, nice rework!

Just one small issue, settings that are set to true by default in DB.lua seem to get set back to true automatically on reload ("DRAGONRIDING_UPDATE = true" for instance for the main bar).
Variables that are set to false in DB.lua don't seem to get set back to false, so the cause might be that unchecking a setting removes the "x = true" line for the active profile instead of setting it to false, making that setting fall back to the default value?
For now I simply commented out the lines in DB.lua corresponding to the settings I want and everything works perfectly.

(I'm posting this here because comments fail to post for me on curseforge right now)

commented

Just a few clarifications:

  • this issue seems to occur on any profile, not just the Default profile
  • this only affects settings that are set to true individually, as the variable "enabled" which is set to true for all elements by default inside ["**"] doesn't get reset
  • on a fresh profile I tried setting DRAGONRIDING_UPDATE manually to false for MainMenuBar inside the WTF file, and upon loading the setting was properly set to false, but after a reload it changed to true and the setting was removed from the WTF file
commented

Setting those variables to false explicitly inside ["**"] solves the issue, and now those settings are saved properly when set to false. I figured that's what ["*"] = false is supposed to do but I guess it works differently

Only the 5 settings that are currently overriden for specific elements inside DB.lua need to be added (those are DRAGONRIDING_UPDATE, COMBAT_UPDATE, DUNGEON_UPDATE, PARTY_GROUP_UPDATE and RAID_GROUP_UPDATE).

But you might want to add the rest as well in case you set any of them to true by default in the future (MOUNT_UPDATE, NPC_UPDATE, RAID_UPDATE, BATTLEGROUND_UPDATE, ARENA_UPDATE, SCENARIO_UPDATE and OPEN_WORLD_UPDATE)

commented

By the way there are 2 BuffFrame entries in DB.lua with different settings, I'm not sure which settings you actually want as default so I didn't include that in the pull request

commented

Hi sorry I already fixed it but were running some keys. I will push an update later. This was sort of the right direction but set ["**"] = false is enough. The problem was that the getter function was recieving nil instead of false due to this.
Hm, for me there is only one BuffFrame and one DebuffFrame entry.

commented

And thank you for reporting the issue!

commented

Oh sorry about that, I meant 2 ChatFrame entries (lines 68 and 75)
Thanks for explaining what the issue was, ["*"] = false not being enough had me confused :)

commented

Ah thanks. An oversight! A good explanation can be found here: https://www.wowace.com/projects/ace3/pages/ace-db-3-0-tutorial

commented

Fixed with 55b7319