In ListItem_OnClick(): Added code to check if the mouse is over a new entry (it should be). If so, attach the highlight texture to it and generate its tooltip.
James D. Callahan III [03-26-10 - 02:41]
In ListItem_OnClick(): Added code to check if the mouse is over a new entry (it should be). If so, attach the highlight texture to it and generate its tooltip.
diff --git a/Frame.lua b/Frame.lua
index af1e9cd..41c98d6 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -2530,6 +2530,28 @@ do
spell_tip:Hide()
MainPanel.scroll_frame:Update(false, true)
+
+ -- Since the list changed, the mouse is likely over a different entry - the highlight texture and tooltip should be generated for it.
+ local num_entries = #MainPanel.scroll_frame.entries
+
+ if num_entries > 0 then
+ local button_index = 1
+ local string_index = button_index + _G.FauxScrollFrame_GetOffset(MainPanel.scroll_frame)
+
+ while button_index <= NUM_RECIPE_LINES do
+ local cur_state = MainPanel.scroll_frame.state_buttons[button_index]
+ local cur_button = MainPanel.scroll_frame.entry_buttons[button_index]
+
+ if cur_state:IsMouseOver() then
+ Button_OnEnter(cur_state)
+ break
+ elseif cur_button:IsMouseOver() then
+ Bar_OnEnter(cur_button)
+ break
+ end
+ button_index = button_index + 1
+ end
+ end
end
for i = 1, NUM_RECIPE_LINES do