From 116e5fd12957451225451ba8cceb1ab08dfce2e1 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Mon, 29 Mar 2010 22:38:44 -0400 Subject: [PATCH] Fixed the percentage display in the status bar. --- Frame.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Frame.lua b/Frame.lua index f32160b..8768664 100644 --- a/Frame.lua +++ b/Frame.lua @@ -2877,9 +2877,11 @@ do progress_bar:SetMinMaxValues(0, max_value) progress_bar:SetValue(cur_value) - if (floor(recipe_count / max_value * 100) < 101) and recipe_count >= 0 and max_value >= 0 then + local percentage = cur_value / max_value * 100 + + if (floor(percentage) < 101) and cur_value >= 0 and max_value >= 0 then local results = string.format(_G.SINGLE_PAGE_RESULTS_TEMPLATE, recipe_count) - progress_bar.text:SetFormattedText("%d / %d - %1.2f%% - (%s)", cur_value, max_value, recipe_count / max_value * 100, results) + progress_bar.text:SetFormattedText("%d / %d - %1.2f%% (%s)", cur_value, max_value, percentage, results) else progress_bar.text:SetFormattedText("0 / 0 - %s", L["NOT_YET_SCANNED"]) end -- 1.7.9.5