[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmymoney] kmymoney/reports: Make sure a split is selected when constructing the split table of a
From: Alvaro Soliverez <asoliverez () kde ! org>
Date: 2012-04-30 22:46:11
Message-ID: 20120430224611.0D998A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 5cee224d7c23ff6bfaedb9a35b8b88ba82fe5368 by Alvaro Soliverez.
Committed on 27/04/2012 at 23:41.
Pushed by asoliverez into branch 'master'.
Make sure a split is selected when constructing the split table of a
report
BUG:296723
REVIEW:104765
M +7 -0 kmymoney/reports/querytable.cpp
http://commits.kde.org/kmymoney/5cee224d7c23ff6bfaedb9a35b8b88ba82fe5368
diff --git a/kmymoney/reports/querytable.cpp b/kmymoney/reports/querytable.cpp
index 4108144..c418f29 100644
--- a/kmymoney/reports/querytable.cpp
+++ b/kmymoney/reports/querytable.cpp
@@ -1238,6 +1238,13 @@ void QueryTable::constructSplitsTable(void)
loan_special_case = splitAcc.isLoan();
}
+ // There is a slight chance that at this point myBegin is still pointing to splits.end() if the
+ // transaction only has income and expense splits (which should not happen). In that case, point
+ // it to the first split
+ if (myBegin == splits.end()) {
+ myBegin = splits.begin();
+ }
+
//the account of the beginning splits
ReportAccount myBeginAcc = (*myBegin).accountId();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic