In addon:DisplayFrame(): If MainPanel.profession is different from MainPanel.prev_profession, clear the search box. Closes ticket 962.
James D. Callahan III [03-23-10 - 02:45]
In addon:DisplayFrame(): If MainPanel.profession is different from MainPanel.prev_profession, clear the search box. Closes ticket 962.
diff --git a/Frame.lua b/Frame.lua
index 585b28b..c22a759 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -3957,7 +3957,12 @@ function addon:DisplayFrame()
-- Set the search text to the last searched text or the global default string for the search box
-- We should think about either preserving the search everytime arl is open or we clear it completely - pompachomp
- ARL_SearchText:SetText(ARL_LastSearchedText or L["SEARCH_BOX_DESC"])
+ local editbox = MainPanel.search_editbox
+
+ if MainPanel.profession ~= MainPanel.prev_profession then
+ editbox.prev_search = nil
+ end
+ editbox:SetText(editbox.prev_search or L["SEARCH_BOX_DESC"])
end
--------------------------------------------------------------------------------