Skip to content

Commit a8c2060

Browse files
committed
Merge Bob Fewel's 'bug798990' into stable.
2 parents fcd054a + 190fbc2 commit a8c2060

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

gnucash/register/ledger-core/split-register-load.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,10 @@ update_info (SRInfo* info, SplitRegister* reg)
354354
gnc_split_register_get_current_trans_split (reg, NULL);
355355
info->cursor_hint_cursor_class =
356356
gnc_split_register_get_current_cursor_class (reg);
357+
358+
if (!info->first_pass && !info->quickfill_setup)
359+
info->quickfill_setup = TRUE;
360+
357361
info->hint_set_by_traverse = FALSE;
358362
info->traverse_to_new = FALSE;
359363
info->exact_traversal = FALSE;
@@ -746,16 +750,15 @@ gnc_split_register_load (SplitRegister* reg, GList* slist,
746750
}
747751
}
748752

749-
/* If this is the first load of the register,
750-
* fill up the quickfill cells. */
751-
if (info->first_pass)
753+
/* On first load the split list is empty so fill up the quickfill cells
754+
* only on the next load. */
755+
if (!info->first_pass && !info->quickfill_setup)
752756
add_quickfill_completions (reg->table->layout, trans, split, has_last_num);
753757

754758
gnc_completion_cell_add_menu_item (
755759
(CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL),
756760
xaccTransGetDescription (trans));
757761

758-
759762
if (trans == find_trans)
760763
new_trans_row = vcell_loc.virt_row;
761764

gnucash/register/ledger-core/split-register-p.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ struct sr_info
100100
/** true if we are loading the register for the first time */
101101
gboolean first_pass;
102102

103+
/** true if we have setup the quickfills */
104+
gboolean quickfill_setup;
105+
103106
/** true if the user has already confirmed changes of a reconciled
104107
* split */
105108
gboolean change_confirmed;

gnucash/register/ledger-core/split-register-util.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ gnc_split_register_init_info (SplitRegister *reg)
5555
info->last_date_entered = gnc_time64_get_today_start ();
5656

5757
info->first_pass = TRUE;
58+
info->quickfill_setup = FALSE;
5859
info->full_refresh = TRUE;
5960
info->separator_changed = TRUE;
6061

0 commit comments

Comments
 (0)