From 6bcb76e93a8a4a075f79bd18d7ed9658a1c2ddd5 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Mon, 28 Sep 2009 20:31:42 +0000 Subject: [PATCH] Fix bug when register running balance column appears in template transaction. Patch by Tim M: I noticed yesterday a bug in the reg run balance patch that was applied, there is now a "Balance" column displayed in the template transaction register. If you open the scheduled transaction editor, then open a scheduled transaction and go to the "Template Transaction" tab, there is a "Balance" column displayed on the far right side of the register. The attached patch fixes this defect so that the RBALN column is not displayed in template registers. Signed-off-by: Christian Stimming git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18354 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/ledger-core/split-register-layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/register/ledger-core/split-register-layout.c b/src/register/ledger-core/split-register-layout.c index 3092240c97..85bf05acae 100644 --- a/src/register/ledger-core/split-register-layout.c +++ b/src/register/ledger-core/split-register-layout.c @@ -268,7 +268,10 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout) gnc_table_layout_set_cell (layout, curs, DESC_CELL, 0, 2); gnc_table_layout_set_cell (layout, curs, TDEBT_CELL, 0, 5); gnc_table_layout_set_cell (layout, curs, TCRED_CELL, 0, 6); - gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7); + if (!reg->is_template) + { + gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7); + } gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8); curs_last = curs;