diff --git a/src/view/StatsPanel.cpp b/src/view/StatsPanel.cpp index 43fb5a4..1c0f02a 100644 --- a/src/view/StatsPanel.cpp +++ b/src/view/StatsPanel.cpp @@ -185,6 +185,9 @@ StatsPanel::StatsPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent), _hbox2->addLayout(_vbox2); vbox->addLayout(_hbox2); + _hbox2->addLayout(_vbox3); + _hbox2->addWidget(_pie); + OnRangeChange(0); layout(); @@ -232,8 +235,6 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT if (_plot) { _vbox2->removeWidget(_plot); - _hbox2->removeItem(_vbox3); - _hbox2->removeWidget(_pie); delete _plot; } @@ -404,9 +405,6 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT _statsGrid->resizeColumnsToContents(); - _hbox2->addLayout(_vbox3); - _hbox2->addWidget(_pie); - layout(); }