Skip to content

Commit

Permalink
Bug 799391 - Transaction Cut/Paste doesn't move the transaction to th…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
Bob-IT committed Sep 15, 2024
1 parent ab641b3 commit 69dac5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gnucash/register/ledger-core/split-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 69dac5c

Please sign in to comment.