Slightly improved display management of delayed widgets in chart widget.

This commit is contained in:
23rd 2023-08-24 23:03:37 +03:00 committed by John Preston
parent 160794b26c
commit ae81373cff
1 changed files with 3 additions and 2 deletions

View File

@ -917,7 +917,6 @@ int ChartWidget::resizeGetHeight(int newWidth) {
newWidth, newWidth,
st::statisticsChartFooterHeight); st::statisticsChartFooterHeight);
if (_filterButtons) { if (_filterButtons) {
_filterButtons->show();
_filterButtons->moveToLeft(0, resultHeight - filtersHeight); _filterButtons->moveToLeft(0, resultHeight - filtersHeight);
} }
_chartArea->setGeometry( _chartArea->setGeometry(
@ -1270,7 +1269,6 @@ void ChartWidget::setupFilterButtons() {
return; return;
} }
_filterButtons = base::make_unique_q<ChartLinesFilterWidget>(this); _filterButtons = base::make_unique_q<ChartLinesFilterWidget>(this);
_filterButtons->show();
_filterButtons->buttonEnabledChanges( _filterButtons->buttonEnabledChanges(
) | rpl::start_with_next([=](const ChartLinesFilterWidget::Entry &e) { ) | rpl::start_with_next([=](const ChartLinesFilterWidget::Entry &e) {
@ -1303,8 +1301,11 @@ void ChartWidget::setChartData(Data::StatisticalChart chartData) {
updateBottomDates(); updateBottomDates();
_animationController.finish(); _animationController.finish();
addHorizontalLine(_animationController.finalHeightLimits(), false); addHorizontalLine(_animationController.finalHeightLimits(), false);
RpWidget::showChildren();
_chartArea->update(); _chartArea->update();
_footer->update(); _footer->update();
RpWidget::resizeToWidth(width());
} }
void ChartWidget::setTitle(rpl::producer<QString> &&title) { void ChartWidget::setTitle(rpl::producer<QString> &&title) {