Premade Groups Filter

Premade Groups Filter

9M Downloads

Settings checkboxes are not properly saved/loaded

Jundarer opened this issue ยท 3 comments

commented

The text boxes seem to load correctly but the checkboxes aren't. I have tried changing the value of everything to false in the the lua file and it still showed everything except difficulty and no ilvl as true. I assume these values are pulled from elsewhere but I have no idea where.

commented

The checkboxes are indeed not saved, but are automatically checked whenever a value is added to either the min or max edit field and unchecked if neither value is present. The only exceptions from that are the difficulty checkbox and the or-no-itemlevel-specified checkbox. The reason why I did not save the min-max checkboxes was because many players did not realize that they have to check the box to active the filter. I had many complaints about the addon not working correctly, so I changed the behavior to automatically check/uncheck the boxes. Players can still temporarily uncheck a box, but this won't be saved on a reload/relogin. Closing as this is not a bug, although I admit that the current behavor is not optimal. An option I am thinking about is to remove the checkboxes on min-max fields altogether, but this on the other hand will also make some players (like me) unhappy.

commented

Thanks for the quick response! Could you point me to the file or commit where this behavior was changed so I can revert it for myself?

commented

I quickly checked the commits, but did not find it first try, so I looked at the code and realised that PGF.Dialog_LoadMinMaxFromModel already loads the checkbox state. Since SetText() changes the text and triggers PGF.Dialog_MinMax_OnTextChanged, my assumption is that this overrides the initial value from the saved variables. So you have two options:

I did not have the time to test it, but hope it helps.