Bug 799391 - Transaction Cut/Paste doesn't move the transaction to the target account

Move the clearing of the 'copied_item' to before the setting of the
'copied_leader_guid'. This change is required due to a recent change to
include resetting 'copied_leader_guid' in the 'clear_copied_item'
function.
This commit is contained in:
Robert Fewell 2024-09-15 10:43:43 +01:00
parent ab641b31f8
commit 69dac5c1a7

View File

@ -98,6 +98,7 @@ clear_copied_item()
gnc_float_txn_free (copied_item.ft);
copied_item.ftype = 0;
copied_item.fs = NULL;
copied_item.ft = NULL;
copied_class = CURSOR_CLASS_NONE;
copied_leader_guid = *guid_null();
}
@ -785,6 +786,9 @@ gnc_split_register_copy_current_internal (SplitRegister* reg,
return;
}
/* unprotect the old object, if any */
clear_copied_item();
/* Ok, we are now ready to make the copy. */
if (cursor_class == CURSOR_CLASS_SPLIT)
@ -834,9 +838,6 @@ gnc_split_register_copy_current_internal (SplitRegister* reg,
return;
}
/* unprotect the old object, if any */
clear_copied_item();
if (new_fs)
{
copied_item.fs = new_fs;