Bug 319461

Summary: Interest account name cleared when new fee entry created
Product: [Applications] kmymoney Reporter: allan <agander93>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: onet.cristian
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description allan 2013-05-07 10:48:43 UTC
At first, I couldn't always reproduce this, as it happens only when a new fee account is added to a new transaction.
In a new Dividend transaction, if an interest account is added and then a fee account, when the fee wizard is closed, the interest account name has been deleted.

Reproducible: Always

Steps to Reproduce:
1. Create a new Dividend transaction.
2. Enter a new interest account and value.
3. Enter a new fee account name and complete the wizard.
4. When the wizard is closed, the interest name field has been cleared.

Actual Results:  
As in 4. above.

Expected Results:  
The interest account name should not be cleared, as happens if an existing transaction is edited instead of a new one being created.

InvestTransactionEditor::slotReloadEditWidgets() gets called and because splits.count() is zero, 
case 0: in the switch instruction is entered, where category->clearEditText() clears the interest account name.
I'm unclear why that instruction is there and removing it resolves the problem, and so far I see no ill effects.
Can anyone see why it might need to be there, please?
Comment 1 Cristian OneČ› 2014-09-24 12:15:47 UTC

*** This bug has been marked as a duplicate of bug 322768 ***