Offset reset to default after /reload
ZMXSSC opened this issue · 4 comments
When reporting, please verify the issue with only this addon enabled and no others unless explicitly reporting an incompatibility between this addon and another. Likewise, please fill in the below information to the best of your ability — this information helps us a great deal.
Issue description:
Hello, I encountered a problem where whenever I /reload, the vertical and horizontal offset I set no longer works. For example, if I set an offset to 0.2, every time I reload, on the raid frame that indicator is actually at position 0(yet in the configuration it still shows 0.2). I have to do something like setting the offset to 0.21 and setting it back to 0.2 to solve the issue. Is there any solution to this? Thank you!
How to reproduce:
E.g., Steps to reproduce the behavior...
- /reload
- *offset I set doesn't work anymore unless I retune the offset back and forth *
Hrm, these are the lines in question:
local iconVerticalOffset = floor(self.db.profile[i].indicatorVerticalOffset * frame:GetHeight()) --round down
local iconHorizontalOffset = floor(self.db.profile[i].indicatorHorizontalOffset * frame:GetWidth()) --round down
The only way I can see this line of code failing is if for some reason frame:GetHeight() and frame:GetWidth() were erroneously returning 0 instead of a real value, or self.db.profile[i].indicatorVerticalOffset and self.db.profile[i].indicatorHorizontalOffset were erroneously returning 0 (the database default) instead of their set value (between -1 and 1). This ladder should only happen in the case that the database isn't correctly loading by the time we create the frames, but that should then logically apply to ALL database values not just that one set of values.
I've only seen database errors like this happen in the case where someone's computer is REALLY slow or REALLY fast, thus breaking some order of operations based functions. Do you think your computer falls into either of those categories?
Can you try setting a different value for something such as the icon size to see if that also isn't set upon login? I want to try to narrow it down to this specific set of settings, or any/all visual settings.
Is this on all of your toons or just one?
Was this always the case, or did it just start happening in a specific release?