Bug 322390 - Interest-amount and fee-amount widgets and others) appear on resizing.
Summary: Interest-amount and fee-amount widgets and others) appear on resizing.
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-15 12:52 UTC by allan
Modified: 2014-07-31 08:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description allan 2013-07-15 12:52:19 UTC
This feature was mentioned in a bug a couple of months back, and now
I've bumped into it.

If an investment transaction, say a buy, is opened and then the window
is slightly resized both of these widgets appear for no good reason.
The interest-amount one doesn't even feature in buy transactions.

Also, with an IntInc transaction, a resize with the transaction open will result also in the Quantity/Shares and the Price widgets appearing.

I've spent quite a while investigating, but to no avail.  I can't find
any code to do it.  So, thinking that perhaps the widgets were already
there, but not visible for lack of space, I increased the quantity
column width, but the widgets didn't appear until the resize.

As I understand it, when the resize event occurs, the resizing has
already taken place, the window has been cleared and redrawn.  I don't
know where the redrawing takes place, but my suspicion is that all
these widgets get shown then, with no regard for their need.


Reproducible: Always

Steps to Reproduce:
1.As above.
2.
3.
Actual Results:  
These widgets appear for no obvious reason.

Expected Results:  
They should appear only when required.
Comment 1 allan 2013-07-16 21:54:22 UTC
Still can't give up!

Anyway, a bit of progress in understanding where it goes wrong.

To simplify matters, when changing column widths, I set each one using an integer value.  That allows the window to resize without the amount widgets appearing.  The snag with that is that it precludes adjusting the column widths.  In particular, to allow the Detail column to expand or contract on resizing, it's necessary to use a variable.  As soon as a variable is used, however, the old amount widgets reappear.  Setting the header to stretch doesn't help.
Comment 2 allan 2013-07-22 11:51:13 UTC
Finally, I've found a way to hide the unneeded fee-amount widget, which appears on resizing with a ReinvInc transaction open.  More work needed for other transaction types.

I needed a way to access these widgets from register.cpp after the resize.  I've succeeded, but I'm sure there must be an easier way.
Comment 3 Cristian Oneț 2014-07-31 08:19:06 UTC
As far as I know we fixed this.