Last check number problem (cvs version)

David Hampton
26 Feb 2002 00:31:57 -0800

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

I've had lots of problems with the last (saved) check number in a
register window.  When I open a register, tab into the number field, and
hit the plus key, invariably the wrong number appears.  Once I've
entered a check number in a register, the plus key works properly until
I close the register and reopen it.

I've tracked the problem down to the gnc_split_register_save_num_cell
routine in the file split-register-model-save.c, and have a question
about the logic of that routine.  This routine saves the last check
number only if the 'trans' field of the saved data is not the same as
the blank_trans field for that register's particular book.  The problem
I see is that any time I am entering a new transaction at the bottom of
the register, these two fields match and the check number is not saved.=20
If I go change the check number on an old transaction, then the number
is remembered as the starting number (- 1) when the register is

It just occurred to me as I was writing this message that the logic of
this test might be reversed.  That seems too simple a solution, and I
feel like I've missed something somewhere.  I'd appreciate any pointers.


Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see