From 790be76343b96e78c93f204631427e5c65335a83 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Mon, 22 Mar 2010 22:45:57 -0400 Subject: [PATCH] In addon:DisplayFrame(): If MainPanel.profession is different from MainPanel.prev_profession, clear the search box. Closes ticket 962. --- Frame.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -------------------------------------------------------------------------------- -- 1.7.9.5