If there is a current split, then ensure that the transaction

containing that split stays in the register.  This will make the
transaction being edited stay in the register until you move to
another transaction, even though the accounts may have been
changes. #92158


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7535 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2002-11-24 06:56:45 +00:00
parent aa9c4dca69
commit 3422380ce6
3 changed files with 42 additions and 1 deletions

View File

@ -18,6 +18,16 @@
(sxed_close_event): Check for a valid SX before proceeding; fixes
Bugs#99350 and dupes [99348,99356,99397].
2002-11-23 Matthew Vanecek <mevanecek@yahoo.com>
* src/engine/Account.c (xaccAccountCommitEdit): Internationalize
the PWARN_GUI() string argument.
* src/backend/postgres/PostgresBackend.c: Added messages.h to support
string internationalization.
* src/backend/postgres/PostgresBackend.c (pgend_session_begin):
an xaccBackendSetMessage() call was missing the Backend argument.
2002-11-23 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-gettrans.c: Use the new generic
@ -42,6 +52,22 @@
2002-11-23 David Hampton <hampton@employees.org>
* src/register/ledger-core/gnc-ledger-display.c (refresh_handler):
If there is a current split, then ensure that the transaction
containing that split stays in the register. This will make the
transaction being edited stay in the register until you move to
another transaction, even though the accounts may have been
changes. #92158
* src/register/ledger-core/split-register-control.c
(gnc_split_register_move_cursor): If all the entries of the
current split have been cleared, then delete this split. #98139
(gnc_split_register_old_split_empty_p): New function.
* src/engine/Account.c (xaccTransFixSplitDateOrder):
(xaccTransFixSplitDateOrder): Prevent this routine from causing a
recursive call to itself.
* src/gnome-utils/commodity.glade: Change the title of the 'New
Currency/Security' dialog to 'New Security' to match its actual
function. #95596

View File

@ -1248,15 +1248,18 @@ xaccAccountFixSplitDateOrder (Account * acc, Split *split)
void
xaccTransFixSplitDateOrder (Transaction *trans)
{
GList *node;
GList *node, *next;
static int level = 0;
if (trans == NULL) return;
gnc_engine_suspend_events();
for (node = trans->splits; node; node = node->next)
{
Split *s = node->data;
xaccAccountFixSplitDateOrder (xaccSplitGetAccount(s), s);
}
gnc_engine_resume_events();
}
/********************************************************************\

View File

@ -549,6 +549,7 @@ refresh_handler (GHashTable *changes, gpointer user_data)
const EventInfo *info;
gboolean has_leader;
GList *splits;
Split *current_split;
if (ld->loading)
return;
@ -577,6 +578,17 @@ refresh_handler (GHashTable *changes, gpointer user_data)
splits = xaccQueryGetSplits (ld->query);
/*
* If the user is in the middle of editing a transaction, make sure
* that transaction stays in the register instead of ripping it out
* from underneath them.
*/
current_split = gnc_split_register_get_current_split (ld->reg);
if (current_split &&
(g_list_find(splits, current_split) == NULL)) {
g_list_append(splits, current_split);
}
gnc_ledger_display_set_watches (ld, splits);
gnc_ledger_display_refresh_internal (ld, splits);