r18188 - gnucash/trunk/src/register/ledger-core - Bug #587913: Register: Don't mark the account cell as changed if the name hasn't changed.
Charles Day
cedayiv at code.gnucash.org
Tue Jul 7 17:15:01 EDT 2009
Author: cedayiv
Date: 2009-07-07 17:15:01 -0400 (Tue, 07 Jul 2009)
New Revision: 18188
Trac: http://svn.gnucash.org/trac/changeset/18188
Modified:
gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Bug #587913: Register: Don't mark the account cell as changed if the name hasn't changed.
Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c 2009-07-07 20:09:14 UTC (rev 18187)
+++ gnucash/trunk/src/register/ledger-core/split-register.c 2009-07-07 21:15:01 UTC (rev 18188)
@@ -1684,7 +1684,7 @@
/* Find the account */
account = gnc_account_lookup_for_register (gnc_get_current_root_account (), name);
if (!account)
- account = gnc_account_lookup_by_code (gnc_get_current_root_account (), name);
+ account = gnc_account_lookup_by_code(gnc_get_current_root_account(), name);
if (!account) {
/* Ask if they want to create a new one. */
@@ -1699,11 +1699,15 @@
return NULL;
}
- /* Now have the account. Update the cell with the name as created. */
- *refresh = TRUE;
+ /* Now have the account. */
account_name = gnc_get_account_name_for_register (account);
- gnc_combo_cell_set_value (cell, account_name);
- gnc_basic_cell_set_changed (&cell->cell, TRUE);
+ if (safe_strcmp(account_name, gnc_basic_cell_get_value(bcell)))
+ {
+ /* The name has changed. Update the cell. */
+ gnc_combo_cell_set_value (cell, account_name);
+ gnc_basic_cell_set_changed (&cell->cell, TRUE);
+ *refresh = TRUE;
+ }
g_free (account_name);
/* See if the account (either old or new) is a placeholder. */
More information about the gnucash-changes
mailing list