mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't let users delete the split that attaches a transaction to the
current register. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7703 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d52d3b8f60
commit
16826e719c
@ -1053,10 +1053,18 @@ gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data )
|
|||||||
const char *recn_warn = _("You would be deleting a reconciled split!\n"
|
const char *recn_warn = _("You would be deleting a reconciled split!\n"
|
||||||
"This is not a good idea as it will cause your "
|
"This is not a good idea as it will cause your "
|
||||||
"reconciled balance to be off.");
|
"reconciled balance to be off.");
|
||||||
|
const char *anchor_split = _("This is the split anchoring this transaction "
|
||||||
|
"to the register. You may not delete it from "
|
||||||
|
"this register window.");
|
||||||
const char *memo;
|
const char *memo;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
char recn;
|
char recn;
|
||||||
|
|
||||||
|
if (split == gnc_split_register_get_current_trans_split (reg, NULL)) {
|
||||||
|
gnc_error_dialog(anchor_split);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
memo = xaccSplitGetMemo (split);
|
memo = xaccSplitGetMemo (split);
|
||||||
memo = (memo && *memo) ? memo : _("(no memo)");
|
memo = (memo && *memo) ? memo : _("(no memo)");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user