Show january when loading year != curYear and not curMonth

This commit is contained in:
Grégory Soutadé 2012-05-01 10:30:08 +02:00
parent 3f428ab7c2
commit aff6e14072

View File

@ -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++)
{