From b4925363d6e17ebe416c8279089e17527114027b Mon Sep 17 00:00:00 2001 From: gswatkins Date: Tue, 9 Jan 2024 08:56:17 -0500 Subject: [PATCH] Display accurate precision for percent config values (#3466) Percent config values are managed as float types, but decimal precision is not displayed in the GUI. This change uses the `double_to_string()` converstion rather than casting to an int when retrieving the config option value. --- src/slic3r/GUI/OptionsGroup.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 086e90fc57..401dede309 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -981,8 +981,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config } case coPercent:{ double val = config.option(opt_key)->value; - text_value = wxString::Format(_T("%i"), int(val)); - ret = text_value;// += "%"; + ret = double_to_string(val);// += "%"; } break; case coPercents: