oUF

97.2k Downloads

Reset frame unit on hide

hymccord opened this issue ยท 2 comments

commented

My addon caches which unit is assigned to a frame but when the frame is hidden (unit gets moved to a different group with no replacement movement) the old frame still points to the unit even though it's hidden.

I'm using a quick fix right now. In initObject, I added a setscrip for onHide in oUF.lua to call updateActiveUnit then I just used

    if(event == 'OnHide') then 
        self.unit = self.unitframeType
        return 
    end
commented

Closing due to inactivity, no response from @inkahootz.

commented

Frames and their units are static, can you be more specific about your issue?

If you just need to set something when a frame is hidden you can use HookScript in your layout.