From 61b1c1fbe7b3330bf80f719062e8f1ae57c84575 Mon Sep 17 00:00:00 2001 From: torhal Date: Mon, 18 May 2009 21:45:57 +0000 Subject: [PATCH] Changed the "Alt Tradeskills" button to hide the menu if nothing has been modified and regenerate it otherwise. --- ARLFrame.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index 2cdd763..79cc6e1 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -3215,6 +3215,7 @@ local click_info = { anchor = nil, change_realm = nil, target_realm = nil, + modified = nil, name = nil, realm = nil, } @@ -3313,7 +3314,7 @@ local function HandleTTClick(cell, arg, event) -- Print link to chat frame, then reset tip data addon:Print(click_info.name .. " - " .. click_info.realm .. ": " .. tskl_list[click_info.realm][click_info.name][arg]) end - + click_info.modified = true end clicktip:SetCallback("OnMouseDown", HandleTTClick) @@ -4561,10 +4562,17 @@ function addon:CreateFrame( function(this, button) clicktip:SetParent(this) if clicktip:IsShown() then - clicktip:Hide() + if not click_info.modified then + clicktip:Hide() + wipe(click_info) + else + wipe(click_info) + GenerateClickableTT(this) + end + else wipe(click_info) + GenerateClickableTT(this) end - GenerateClickableTT(this) end) ARL_MiscAltBtn:SetScript("OnHide", function(this, button) -- 1.7.9.5