diff --git a/src/view/StatsPanel.cpp b/src/view/StatsPanel.cpp index 1c0f02a..441a2d1 100644 --- a/src/view/StatsPanel.cpp +++ b/src/view/StatsPanel.cpp @@ -253,20 +253,18 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT _plot->setDataset(0, vec, ""); - vec.clear(); + i=0; for (account = 0, i = 0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); account++, accountIt++, i++) { if (_account->item(account)->checkState() != Qt::Checked) - { - i-- ; continue; - } - for (a=0; aid][a]; - _plot->setDataset(i+1, vec, user->GetAccountName(accountIt->id)); + _plot->setDataset(++i, vec, user->GetAccountName(accountIt->id)); } } else @@ -355,7 +353,6 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT legend->setTitleText(_("Accounts")); legend->setText(0, _("0 line")); { - QVector vec; i = 1; for (a=0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); a++, accountIt++)