Add traverse_to_new check.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6194 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-12-04 11:26:28 +00:00
parent f2d903e154
commit 9f97340832
2 changed files with 7 additions and 10 deletions

View File

@ -41,15 +41,6 @@ static void gnc_entry_ledger_move_cursor (VirtualLocation *p_new_virt_loc,
gnc_suspend_gui_refresh ();
saved = gnc_entry_ledger_save (ledger, old_entry != new_entry);
/* XXX: This code seems to always force the cursor to stay in place.
* With this code commented out, the cursor will at least move if
* the next split already exists....
if (old_entry && old_entry != new_entry) {
new_entry = old_entry;
new_virt_loc = ledger->table->current_cursor_loc;
}
/*
gnc_resume_gui_refresh();
/* redrawing can muck everything up */
@ -59,6 +50,9 @@ static void gnc_entry_ledger_move_cursor (VirtualLocation *p_new_virt_loc,
/* redraw */
gnc_entry_ledger_redraw (ledger);
if (ledger->traverse_to_new)
new_entry = gncEntryLookup (ledger->book, &ledger->blank_entry_guid);
/* if the entry we were going to is still in the register,
* then it may have moved. Find out where it is now. */
if (gnc_entry_ledger_find_entry (ledger, new_entry, &vcell_loc)) {
@ -109,6 +103,8 @@ static gboolean gnc_entry_ledger_traverse (VirtualLocation *p_new_virt_loc,
if (!ledger) return FALSE;
ledger->traverse_to_new = FALSE;
entry = gnc_entry_ledger_get_current_entry (ledger);
if (!entry)
return FALSE;
@ -218,7 +214,7 @@ static gboolean gnc_entry_ledger_traverse (VirtualLocation *p_new_virt_loc,
p_new_virt_loc->phys_row_offset = 0;
p_new_virt_loc->phys_col_offset = 0;
// info->traverse_to_new = TRUE;
ledger->traverse_to_new = TRUE;
return FALSE;

View File

@ -15,6 +15,7 @@
struct GncEntryLedger_s {
GUID blank_entry_guid;
gboolean blank_entry_edited;
gboolean traverse_to_new;
Timespec last_date_entered;