> On Nov 13, 2021, at 2:56 AM, Lionel Élie Mamane <lio...@mamane.lu> wrote: > > Hi, > > I spent some time trying to look at fixing bug 798369 > https://bugs.gnucash.org/show_bug.cgi?id=798369 > before filing it, but I came out empty-handed. > > I found in gnucash/register/ledger-core/split-register-model.c: > > - the decision to lock/unlock the cells is made by > gnc_split_register_get_security_io_flags > (by calling gnc_split_register_use_security_cells) > > - the decision not to show the contents is made by > gnc_split_register_get_shares_entry and > gnc_split_register_get_price_entry > (again by calling gnc_split_register_use_security_cells) > > - the decision on the title of the columns is made by > gnc_split_register_get_shares_label and > gnc_split_register_get_price_label > (again by calling gnc_split_register_use_security_cells) > > > But why these are not called in a new split, but are called when > editing an existing split, I could not find. > > Anybody has a hint/idea?
I had to step through it in the debugger to track down the reason. They *are* called--several times--on the shares and price entries when you move into and out of them. gnc_split_register_use_security_cells looks up the split that currently has focus in the book and if it's not there it returns TRUE, meaning that the cell contents and label displays. The "new" split (it's called the blank split in code) isn't registered with the book until it's committed; that is when you exit its row in the register. Regards, John Ralls _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel