From 42f4a74ea63d6e8265b15005a2988bd4a7e62b14 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Mon, 10 Nov 2014 13:09:39 +0100 Subject: [PATCH] Don't show a seperator line if no tooltip content is being added --- BagSync.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/BagSync.lua b/BagSync.lua index 35deb60..1f2a227 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -888,12 +888,7 @@ local function AddItemToTooltip(frame, link) --workaround --this is so we don't scan the same guild multiple times local previousGuilds = {} local grandTotal = 0 - - --check for seperator - if BagSyncOpt.enableTooltipSeperator then - frame:AddDoubleLine(" ", " ") - table.insert(lastDisplayed, " @ ") - end + local first = true --loop through our characters --k = player, v = stored data for player @@ -964,6 +959,13 @@ local function AddItemToTooltip(frame, link) --workaround infoString = CountsToInfoString(allowList) if infoString and infoString ~= '' then + --check for seperator + if first and BagSyncOpt.enableTooltipSeperator then + first = false + frame:AddDoubleLine(" ", " ") + table.insert(lastDisplayed, " @ ") + end + frame:AddDoubleLine(getNameColor(k, pClass), infoString) table.insert(lastDisplayed, getNameColor(k or 'Unknown', pClass).."@"..(infoString or 'unknown')) end -- 1.7.9.5