From a576dd87a4584771c87070f5f90e7e934d450dc4 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 19 Mar 2023 13:31:50 +0000 Subject: [PATCH] Bug798558 - Irregular line spacing in Account Tree View When securities are in the list, the rows look twice as high as though there is a linefeed at the end. This is partly due to commit for bug 797501 which worked at the time but a change in pango 50.4 to do with wrapping has highlighted this bug. To fix this only wrap currencies with ltr bidi isolate characters in gnc_print_amount_with_bidi_ltr_isolate --- libgnucash/app-utils/gnc-ui-util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c index a165de5529..a8de2e4084 100644 --- a/libgnucash/app-utils/gnc-ui-util.c +++ b/libgnucash/app-utils/gnc-ui-util.c @@ -1486,6 +1486,9 @@ gnc_print_amount_with_bidi_ltr_isolate (gnc_numeric val, GNCPrintAmountInfo info static const char ltr_pop_isolate[] = { 0xe2, 0x81, 0xa9 }; size_t offset = info.use_symbol ? 3 : 0; + if (!gnc_commodity_is_currency (info.commodity)) + offset = 0; + memset (buf, 0, BUFLEN); if (!xaccSPrintAmount (buf + offset, val, info)) { @@ -1493,7 +1496,7 @@ gnc_print_amount_with_bidi_ltr_isolate (gnc_numeric val, GNCPrintAmountInfo info return buf; }; - if (!info.use_symbol) + if (offset == 0) return buf; memcpy (buf, ltr_isolate, 3);