Bug 506627

Summary: Last added transaction not selected in the ledger
Product: [Applications] kmymoney Reporter: gbcreation73
Component: ux-uiAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.2.1
Sentry Crash Report:

Description gbcreation73 2025-07-05 09:50:36 UTC
SUMMARY

When creating a new transaction in a ledger, it is added at the right position in the list depending on its date but it is not selected (the last transaction of the list is selected). In previous versions of Kmymoney, the just added transaction was automatically selected in the list, what allows to visually check that it is at the right position according to its date.

STEPS TO REPRODUCE
1. Add a new transaction whose date is before some existing transactions
2. After clicking the Enter button, see that the last transaction of the list is selected instead of the newly created one

OBSERVED RESULT

The last transaction of the list is selected

EXPECTED RESULT

The newly created transaction should be selected

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.4.0
Comment 1 Thomas Baumgart 2025-07-05 11:40:18 UTC
Git commit d83147a35411a1067e7b905ec584a0eef20a3b9a by Thomas Baumgart.
Committed on 05/07/2025 at 11:40.
Pushed by tbaumgart into branch 'master'.

Select newly entered transaction as current transaction
FIXED-IN: 5.2.1

M  +1    -0    kmymoney/views/investtransactioneditor.cpp
M  +1    -0    kmymoney/views/newtransactioneditor.cpp
M  +16   -0    kmymoney/views/transactioneditorbase.cpp
M  +7    -0    kmymoney/views/transactioneditorbase.h

https://invent.kde.org/office/kmymoney/-/commit/d83147a35411a1067e7b905ec584a0eef20a3b9a
Comment 2 Thomas Baumgart 2025-07-05 11:41:00 UTC
Git commit a2824866f6c5ca3a86f6c7bcf3d74944f266cb77 by Thomas Baumgart.
Committed on 05/07/2025 at 11:40.
Pushed by tbaumgart into branch '5.2'.

Select newly entered transaction as current transaction
FIXED-IN: 5.2.1
(cherry picked from commit d83147a35411a1067e7b905ec584a0eef20a3b9a)

M  +1    -0    kmymoney/views/investtransactioneditor.cpp
M  +1    -0    kmymoney/views/newtransactioneditor.cpp
M  +16   -0    kmymoney/views/transactioneditorbase.cpp
M  +7    -0    kmymoney/views/transactioneditorbase.h

https://invent.kde.org/office/kmymoney/-/commit/a2824866f6c5ca3a86f6c7bcf3d74944f266cb77