gnucash maint: Bug 797078 - "Automatic decimal point" Should Not Cause 2 Different Behaviors

John Ralls jralls at code.gnucash.org
Sun Nov 10 15:40:03 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/9189bcbe (commit)
	from  https://github.com/Gnucash/gnucash/commit/a482c250 (commit)



commit 9189bcbe41dae281e8b7cf4ee34f7e3d89189070
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Nov 10 12:30:15 2019 -0800

    Bug 797078 - "Automatic decimal point" Should Not Cause 2 Different Behaviors
    
    It's documented only for automatically inserting the decimal point
    so remove the code that affects number display.

diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c
index eb149eb8d..bae5f388b 100644
--- a/libgnucash/app-utils/gnc-ui-util.c
+++ b/libgnucash/app-utils/gnc-ui-util.c
@@ -1553,18 +1553,9 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
         val = gnc_numeric_convert(val, denom, GNC_HOW_RND_ROUND_HALF_UP);
         value_is_decimal = gnc_numeric_to_decimal(&val, NULL);
     }
-    /* Force at least auto_decimal_places zeros */
-    if (auto_decimal_enabled)
-    {
-        min_dp = MAX(auto_decimal_places, info->min_decimal_places);
-        max_dp = MAX(auto_decimal_places, info->max_decimal_places);
-    }
-    else
-    {
-        min_dp = info->min_decimal_places;
-        max_dp = info->max_decimal_places;
-    }
-
+    min_dp = info->min_decimal_places;
+    max_dp = info->max_decimal_places;
+    
     /* Don to limit the number of decimal places _UNLESS_ force_fit is
      * true. */
     if (!info->force_fit)



Summary of changes:
 libgnucash/app-utils/gnc-ui-util.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)



More information about the gnucash-changes mailing list