From aff6e140720e191b34c11b559e657271cc9156da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Tue, 1 May 2012 10:30:08 +0200 Subject: [PATCH] Show january when loading year != curYear and not curMonth --- src/view/AccountPanel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index 6ec1cce..ecc1663 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -388,7 +388,13 @@ void AccountPanel::LoadYear(int year, bool showMonth) if (!parentNode) parentNode = _tree->topLevelItem(0); - month = (_curMonth == -1) ? curDate.month()-1 : _curMonth; + if (_curMonth == -1) + { + if (_curYear == curDate.year()) + month = curDate.month()-1; + else + month = 0; + } for (it = ops[year].begin(); it != ops[year].end(); it++) {