Make the blank split read only

If the transactions are read only or voided and selected for editing a
blank split is added that allows you to change the transaction so in
these cases make the blank split read only.
pull/517/head
Robert Fewell 7 years ago
parent cf3e9239e2
commit d5c3b4af0c

@ -1954,7 +1954,19 @@ gnc_split_register_cursor_is_readonly (VirtualLocation virt_loc,
char type;
split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
if (!split) return FALSE;
if (!split) // this could be the blank split
{
txn = gnc_split_register_get_current_trans (reg);
if (txn) // get the current trans and see if read_only required
{
if (xaccTransGetReadOnly (txn)
|| xaccTransIsReadonlyByPostedDate (txn))
return (TRUE);
}
return FALSE;
}
txn = xaccSplitGetParent (split);
if (!txn) return FALSE;

Loading…
Cancel
Save