Fix a bug : cannot select/deselect accounts in StatsPanel
This commit is contained in:
parent
2e70586e97
commit
ada23a4092
|
@ -342,13 +342,16 @@ void StatsPanel::OnRangeChange(int index)
|
|||
return;
|
||||
}
|
||||
|
||||
for(i=0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++, i++)
|
||||
if (index != -1)
|
||||
{
|
||||
item = _account->item(i);
|
||||
if (accountIt->hidden || !accountIt->validAt(monthFrom, yearFrom, monthTo, yearTo))
|
||||
item->setCheckState (Qt::Unchecked);
|
||||
else
|
||||
item->setCheckState (Qt::Checked);
|
||||
for(i=0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++, i++)
|
||||
{
|
||||
item = _account->item(i);
|
||||
if (accountIt->hidden || !accountIt->validAt(monthFrom, yearFrom, monthTo, yearTo))
|
||||
item->setCheckState (Qt::Unchecked);
|
||||
else
|
||||
item->setCheckState (Qt::Checked);
|
||||
}
|
||||
}
|
||||
|
||||
_costRepartitionBanner->Reset();
|
||||
|
@ -357,5 +360,5 @@ void StatsPanel::OnRangeChange(int index)
|
|||
|
||||
void StatsPanel::OnAccountChange(QListWidgetItem* item)
|
||||
{
|
||||
OnRangeChange(0);
|
||||
OnRangeChange(-1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user