Bug on precedent commit

This commit is contained in:
Grégory Soutadé 2011-06-16 19:23:22 +02:00
parent 63f2a72a06
commit 557037f397

View File

@ -193,7 +193,7 @@ void AccountPanel::InitStatsGrid(User* user)
if (!_statsGrid->GetNumberRows())
{
_statsGrid->CreateGrid(nb_categories+CATS_STATS, 2); // Headers + blank + categories + non fix
_statsGrid->CreateGrid(nb_categories+CATS_STATS+1, 2); // Headers + blank + categories + non fix
_statsGrid->SetColLabelSize(0);
_statsGrid->SetRowLabelSize(0);
_statsGrid->EnableEditing(false);
@ -211,8 +211,16 @@ void AccountPanel::InitStatsGrid(User* user)
for(i=0; i<nb_categories; i++)
{
_statsGrid->SetCellValue(CATS_STATS+i, 0, _categories[i]);
_statsGrid->SetCellAlignment(CATS_STATS+i, 1, wxALIGN_RIGHT, wxALIGN_CENTRE);
if (i)
{
_statsGrid->SetCellValue(CATS_STATS+i+1, 0, _categories[i]);
_statsGrid->SetCellAlignment(CATS_STATS+i+1, 1, wxALIGN_RIGHT, wxALIGN_CENTRE);
}
else
{
_statsGrid->SetCellValue(CATS_STATS+i, 0, _categories[i]);
_statsGrid->SetCellAlignment(CATS_STATS+i, 1, wxALIGN_RIGHT, wxALIGN_CENTRE);
}
}
_statsGrid->AutoSizeColumn(0, false);