From 566457ea609fb6c57b67be7a3cec1924875525fa Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 8 Nov 2015 11:27:39 +0100 Subject: [PATCH] small bugfix in item search --- item_search_frame.lua | 4 ++++ item_search_frame.xml | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/item_search_frame.lua b/item_search_frame.lua index 9daf80f..3325e06 100644 --- a/item_search_frame.lua +++ b/item_search_frame.lua @@ -494,6 +494,10 @@ function public.set_item(item_id) end end +function public.item_set() + return private.item_id ~= nil +end + function public.update_item() if private.item_id and not AuxItemSearchFrameItemItemInputBox:IsVisible() then local info = { GetItemInfo(private.item_id) } diff --git a/item_search_frame.xml b/item_search_frame.xml index 42a6283..3b24584 100644 --- a/item_search_frame.xml +++ b/item_search_frame.xml @@ -65,9 +65,11 @@ if this.selector.selected_value() then Aux.item_search_frame.set_item(this.selector.selected_value()) end - this:Hide() - this.selector.clear() - Aux.item_search_frame.update_item() + if Aux.item_search_frame.item_set() then + this:Hide() + this.selector.clear() + Aux.item_search_frame.update_item() + end this.selector.clear()