Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tooltip.lua #712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions ElvUI/Modules/Tooltip/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -521,20 +521,17 @@ function TT:GameTooltip_OnTooltipSetItem(tt)
if self.db.itemCount == "BAGS_ONLY" then
right = format("|cFFCA3C3C%s|r %d", L["Count"], num)
elseif self.db.itemCount == "BANK_ONLY" then
bankCount = format("|cFFCA3C3C%s|r %d", L["Bank"], (numall - num))
right = format("|cFFCA3C3C%s|r %d", L["Bank"], (numall - num))
elseif self.db.itemCount == "BOTH" then
right = format("|cFFCA3C3C%s|r %d", L["Count"], num)
bankCount = format("|cFFCA3C3C%s|r %d", L["Bank"], (numall - num))
right = right .. " " .. bankCount
end

if left or right then
tt:AddLine(" ")
tt:AddDoubleLine(left or " ", right or " ")
end
if bankCount then
tt:AddDoubleLine(" ", bankCount)
end


Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this line, it "contains only whitespaces" and this is why the check fails. But the code works fine.

tt.itemCleared = true
end

Expand Down Expand Up @@ -732,4 +729,4 @@ local function InitializeCallback()
TT:Initialize()
end

E:RegisterModule(TT:GetName(), InitializeCallback)
E:RegisterModule(TT:GetName(), InitializeCallback)