Bug 269622 - Ledger scroll position is wrong after new transaction
Summary: Ledger scroll position is wrong after new transaction
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 17:26 UTC by David Houlden
Modified: 2011-11-27 22:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
video showing the problem (608.92 KB, video/ogg)
2011-11-19 21:18 UTC, David Houlden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Houlden 2011-03-28 17:26:55 UTC
Version:           SVN trunk (using KDE 4.5.5) 
OS:                Linux

Enter a new transaction into the ledger using the transaction form. If it is the first transaction for today then after it is entered, the "Today" header line appears but this is the last line visible in the ledger. I then have to scroll down to see the newly entered transaction. 

If I then enter a second transaction for today with a lower amount than the first transaction, it appears correctly just below the "Today" header but the first transaction is again pushed off the bottom of the screen so I have to scroll down to see it. My sort options for the ledger are set to the default.

Reproducible: Always
Comment 1 Cristian Oneț 2011-05-21 22:39:42 UTC
Do you still observe this behavior in the current SVN trunk?
Comment 2 David Houlden 2011-05-22 18:01:17 UTC
Updating bug with comments from emails while BKO was unavailable.

> > Hi Cristian,
> > BKO seems to be down just now so I can't update the bug report but yes, I
> > still see the same behaviour.
> 
> Hm, strange because I've asked after not being able to reproduce it
> base on you description, which seems pretty simple. Does this happen
> for all account types?
> 
Yes, I see it on investment, cash, savings, current and credit card accounts. 
In case it is relevant, here are the settings I have selected for the ledger.

Ledger -> Display
Show a grid in the register.
Use the ledger lens.
Show transaction form.
Show group header between transactions.

Ledger -> Sorting
Post date
Reconcile state
Amount

Ledger -> Data Entry
Automatic reconciliation
Default state - Not Reconciled
Autofill if amount differs less than 10%

Scheduled Transactions
Enter 0 days in advance.
Number of days to preview in ledger - 5

I also have the filter set to hide transactions before 1st Jan 2010.
Comment 3 David Houlden 2011-11-19 13:59:23 UTC
I am still seeing this problem but today I happened to run kmymoney in a smaller window than usual and the ledger was displayed correctly after adding a transaction. Usually I have the window maximised to full screen and I always get the problem described. I experimented with different window sizes and sometimes the new ledger entry gets displayed correctly, sometimes I only see the top half of the ledger line and sometimes the whole line is hidden and I have to scroll down to see it. In summary, the problem comes and goes depending on the size of the kmymoney window. I am seeing this on two different PCs.
Comment 4 David Houlden 2011-11-19 21:18:23 UTC
Created attachment 65851 [details]
video showing the problem
Comment 5 Cristian Oneț 2011-11-27 22:07:36 UTC
Git commit afa411fa865ecd67f2cae6c8ea46ed24b6c34ec2 by Cristian Oneț.
Committed on 27/11/2011 at 22:32.
Pushed by conet into branch 'master'.

Since the register has a mechanism to make the selected item visible remove the external
viewport vertical scroll position setting mechanism from kgloballedgerview since the two
mechanisms conflicted with each other causing this bug. This was the code is also simplified
and we can assume that scrollTo does not change the viewport's position if the item is visible.

BUG: 269622

M  +0    -43   kmymoney/views/kgloballedgerview.cpp
M  +0    -6    kmymoney/views/kgloballedgerview.h
M  +2    -1    kmymoney/widgets/register.cpp

http://commits.kde.org/kmymoney/afa411fa865ecd67f2cae6c8ea46ed24b6c34ec2
Comment 6 Cristian Oneț 2011-11-27 22:13:20 UTC
Git commit 9004e476ae5d7e382c5f8b333eda6085b67e30e9 by Cristian Oneț.
Committed on 27/11/2011 at 22:32.
Pushed by conet into branch 'stable'.

Since the register has a mechanism to make the selected item visible remove the external
viewport vertical scroll position setting mechanism from kgloballedgerview since the two
mechanisms conflicted with each other causing this bug. This was the code is also simplified
and we can assume that scrollTo does not change the viewport's position if the item is visible.

BUG: 269622

M  +0    -43   kmymoney/views/kgloballedgerview.cpp
M  +0    -6    kmymoney/views/kgloballedgerview.h
M  +2    -1    kmymoney/widgets/register.cpp

http://commits.kde.org/kmymoney/9004e476ae5d7e382c5f8b333eda6085b67e30e9