Removed from display point details widget with invalid index.

This commit is contained in:
23rd 2023-07-14 02:05:05 +03:00 committed by John Preston
parent 94fd3e32dd
commit 734e1166ad
1 changed files with 7 additions and 0 deletions

View File

@ -1056,6 +1056,13 @@ void ChartWidget::setupDetails() {
_chartData.xPercentage.back(),
}).max);
_details.widget->shownValue(
) | rpl::start_with_next([=](bool shown) {
if (shown && _details.widget->xIndex() < 0) {
_details.widget->hide();
}
}, _details.widget->lifetime());
_chartArea->mouseStateChanged(
) | rpl::start_with_next([=](const RpMouseWidget::State &state) {
if (_animationController.animating()) {