From 8470d1f4f8240117ff42387df798fba1aee933e9 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Sat, 30 Mar 2024 11:12:14 +0100 Subject: [PATCH] FileChooser: "percent - unopened - finished last" make use of "util.round_decimal" --- frontend/ui/widget/filechooser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index 1f5751523..373e6fc9d 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -246,7 +246,7 @@ local FileChooser = Menu:extend{ percent_finished = doc_settings:readSetting("percent_finished") end -- smooth 2 decimal points (0.00) instead of 16 decimal numbers - item.sort_percent = sort_percent or math.floor((percent_finished or -1) * 100) / 100 + item.sort_percent = sort_percent or util.round_decimal(percent_finished or -1, 2) item.percent_finished = percent_finished or 0 end, mandatory_func = function(item)