From 9d993b83941b57c9018a1c3412fef8634303fbde Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 14 Feb 2016 00:30:32 +0100 Subject: [PATCH] some more refactoring of the saved search click code --- search_frame.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/search_frame.lua b/search_frame.lua index 5960709..00f256b 100644 --- a/search_frame.lua +++ b/search_frame.lua @@ -714,15 +714,16 @@ end elseif button == 'LeftButton' and IsAltKeyDown() then private.popup_info.rename = data.search StaticPopup_Show('AUX_SEARCH_SAVED_RENAME') - elseif button == 'RightButton' and st == private.recent_searches_listing then - tinsert(aux_favorite_searches, data.search) - private.update_search_listings() - elseif button == 'RightButton' and st == private.favorite_searches_listing then - tremove(aux_favorite_searches, data.index) - private.update_search_listings() elseif button == 'LeftButton' then private.search_box:SetText(data.search.filter_string) public.start_search() + elseif button == 'RightButton' then + if st == private.recent_searches_listing then + tinsert(aux_favorite_searches, data.search) + elseif st == private.favorite_searches_listing then + tremove(aux_favorite_searches, data.index) + end + private.update_search_listings() end end, OnEnter = function(st, data, self)