new(#6860), part 3: duplicate scheduled transaction to transaction #6878
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR depends on #6873.
New feature
When a single execution of a scheduled transaction is selected in a transactions panel (either for a single account or "All Transactions"), the "Duplicate" button is enabled. If this button is pressed, a transaction dialog is opened with data copied from the scheduled transaction. In contrast to "Enter" (which is enabled only when the first execution of a scheduled transaction is selected), the original scheduled transaction is not modified.
Implementation
In
Fused_Transaction
, define typedefid_t
,getEmptyData()
,getFusedData()
,split()
.In the
mmTransDialog
, renamem_trx_data
tom_fused_data
and change its type toFused_Transaction::Data
; define enumMODE
; replacebool m_new_trx
,bool m_duplicate
withMODE m_mode
.In the
mmTransDialog
constructor, change the third argument fromint transaction_id
toFused_Transaction::id_t fused_id
.Additional changes
Model_Checking
, renamesplittransaction()
->split()
.This change is