Questie

Questie

116M Downloads

Trying to drag Questie Tracker while in combat throws a lua error

Laumesis opened this issue ยท 0 comments

commented

Trying to start draggin Questie tracker while in combat throws a lua error.

  1. Tracker is locked - i.e. requires ctrl down to move.
  2. Get in combat
  3. While pressing crtl down try drag the tracker with left mouse button.
  4. lua error

This happens because the frame is set movable only while ctrl modifier is down if the tracker is locked.
MODIFIER_STATE_CHANGED is registered in QuestieEventHandler.lua and it puts tracker baseFrame:Update() into QuestieCombatQueue. Ihmo this is itself horrible design thinking how many times user might press modifiers during a fight.
Anyway, while player is in combat the tracker frame doesn't get set movable while ctrl is down, but drag events arer still allowed and those try to move the unmovable frame resulting lua error.

Possible dirty hotfix is to do early return on drag start event if combatlockdown is active.
Much better way would be to check modifier at drag starts and enable moving of frame only while it is really get moved. And get rid of detecting modifier changes always related to tracker. For tooltips it might still be required, but imo would be good to register it only while there is a tooltip for it. I am not sure where else modifiers are used on tracker, so those would need code changes too.

v6.8.1